Table of Contents

Method Count

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Count<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>)

Appends a $count stage to the pipeline.

public static PipelineDefinition<TInput, AggregateCountResult> Count<TInput, TIntermediate>(this PipelineDefinition<TInput, TIntermediate> pipeline)

Parameters

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

Returns

PipelineDefinition<TInput, AggregateCountResult>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.