Returns the count of documents that match the query for a collection or view.
The method wraps the $group aggregation stage with a $sum expression to perform the count.
Throws Exception if a DB communication error occurred.
https://www.mongodb.com/docs/manual/reference/method/db.collection.countDocuments/
See Implementation
Returns the count of documents that match the query for a collection or view.
The method wraps the $group aggregation stage with a $sum expression to perform the count.
Throws Exception if a DB communication error occurred.