fun <T> MongoCollection<T>.countDocuments(filter: String): Publisher<Long>
(source)fun <T> MongoCollection<T>.countDocuments(filter: String, options: CountOptions): Publisher<Long>
(source)
Counts the number of documents in the collection according to the given options.