MongoCollection
PHP Manual

MongoCollection::count

(PECL mongo >=0.9.0)

MongoCollection::countCounts the number of documents in this collection

Description

public int MongoCollection::count ( void )

Parameters

This function has no parameters.

Return Values

Returns the number of documents.


MongoCollection
PHP Manual