public function count($condition = [], $options = [])
    {
        return $this->database->createCommand()->count($this->name, $condition, $options);
    }
public function count($condition = [], $options = [])
    {
        return $this->database->createCommand()->count($this->name, $condition, $options);
    }
public function count ( $ condition = [ ] , $ options = [ ] ) { return $ this -> database -> createCommand ( ) -> count ( $ this -> name , $ condition , $ options ) ; }
Counts records in this collection.
@param array $condition query condition
@param array $options list of options in format: optionName => optionValue.
@return int records count.
@since 2.1
Counts records in this collection .