Pipeline implementing the $count stage.
$count
The context used to generate this pipeline.
Counts how many elements exist in the pipeline and outputs a single document containing a single field containing the count.
Changes the type of the returned document, with no type-safety.
JSON representation of this pipeline.
Creates a new pipeline that expands on the current one by adding stage.
Writes the entire pipeline into writer.