estimatedDocumentCount

suspend fun estimatedDocumentCount(options: EstimatedDocumentCountOptions = EstimatedDocumentCountOptions()): Long

Gets an estimate of the count of documents in a collection using collection metadata.

Implementation note: this method is implemented using the MongoDB server's count command

Return

the number of documents in the collection

Parameters

options

the options describing the count

See also