Skip to main content
Very Popular
Latest
method Collection.prototype.countDocuments
import { Collection } from "https://deno.land/x/mongo@v0.33.0/src/collection/mod.ts";

Count the number of documents matching the given filter

Parameters

optional
filter: Filter<T>

The query used to match documents

optional
options: CountOptions

Additional options for the operation

Returns

Promise<number>

The number of documents matching the filter