SQL Reference
ESTIMATEDDOCUMENTCOUNT
db.collection.estimatedDocumentCount(options)
Section titled “db.collection.estimatedDocumentCount(options)”- options: Optional settings such as maxTimeMS.
Example
Section titled “Example”db.orders.estimatedDocumentCount()