Method Count

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

Count(CancellationToken)

Counts the number of documents.

[Obsolete("Use CountDocuments instead.")]
long Count(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

long

The count.