Table of Contents

Method Count

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.