In MongoDB the cursor.count() method counts the number of documents referenced by a cursor..
Note that it doesn’t actually perform the query. It simply counts and returns the number of results that would be returned by the query.
The cursor.count() method is a wrapper for the count command.