A general count query will be doing a
int count = collection.Find(filter).Count();
Now that loads all the records as per the filter, so le
You need to use the explicit CountAsync method and not Find:
CountAsync
Find
long result = await collection.CountAsync(Builders<Hamster>.Filter.Eq(_ => _.Name, "bar"));