In my tests it takes less than 2 seconds to run the iteration that you are talking about using this code:
SearchResultListing result = search.GetResultListing(settings);
IList<int> counts = new List<int>(result.RowCount);
foreach (EntryListingRow row in result)
{
int id = int.Parse(row.GetDatumAsString(SystemColumn.Id),
NumberStyles.AllowThousands);
DocumentInfo info = new DocumentInfo(id, session);
counts.Add(info.GetAnnotations().Count);
info.Dispose();
}
I ran the benchmark using both server and client machines that were run on limited-resource VMs. My 1024 documents had a random number of annotations between 1-10 inclusive. If you ran it on a production server and a physical workstation, I wouldn't be surprised if those times could be brought down under a second.
If you really need something more responsive than that, the SDK isn't going to be able to do it. Even if the server had an option to include annotation count as a system column, there would be a similar overhead since the server would have to perform this work.
Note that the amount of data transmitted here is fairly well minimized. No document pages, text, fields, or e-docs are sent. Only the annotations.