limit

open fun limit(limit: Int)(source)

The maximum number of matching documents to return.

collections.count {
options {
limit(99)
}
}

open fun limit(limit: Long)(source)

The maximum number of matching documents to return.

collections.count {
options {
limit(99L)
}
}

Note that not all drivers support specifying a limit larger than an Int.