fun <T> MongoCollection<T>.countDocuments(filter: String, options: CountOptions = CountOptions()): Mono<Long>
(source)
Counts the number of documents in the collection according to the given options.
Return
count of filtered collection
fun <T> MongoCollection<T>.countDocuments(clientSession: ClientSession, filter: String, options: CountOptions = CountOptions()): Mono<Long>
(source)
Counts the number of documents in the collection according to the given options.
clientSession
- the client session
Return
count of filtered collection