yii\mongodb\Collection::count PHP Метод

count() публичный Метод

Counts records in this collection.
С версии: 2.1
public count ( array $condition = [], array $options = [] ) : integer
$condition array query condition
$options array list of options in format: optionName => optionValue.
Результат integer records count.
    public function count($condition = [], $options = [])
    {
        return $this->database->createCommand()->count($this->name, $condition, $options);
    }