public function count($conditions = false, $count = '1')
    {
        $this->andWhere($conditions);

        $select = $this->sqlParts['select'];
        $this->select('COUNT(' . $count . ')');
        $count = (int)$this->db->fetchColumn($this->getSqlForSelect(true), $this->params);
        $this->sqlParts['select'] = $select;

        return $count;
    }
public function count($conditions = false, $count = '1')
    {
        $this->andWhere($conditions);

        $select = $this->sqlParts['select'];
        $this->select('COUNT(' . $count . ')');
        $count = (int)$this->db->fetchColumn($this->getSqlForSelect(true), $this->params);
        $this->sqlParts['select'] = $select;

        return $count;
    }
public function count ( $ conditions = false , $ count = '1' ) { $ this -> andWhere ( $ conditions ) ; $ select = $ this -> sqlParts [ 'select' ] ; $ this -> select ( 'COUNT(' . $ count . ')' ) ; $ count = ( int ) $ this -> db -> fetchColumn ( $ this -> getSqlForSelect ( true ) , $ this -> params ) ; $ this -> sqlParts [ 'select' ] = $ select ; return $ count ; }
Executes a COUNT query to receive the rows number

@param mixed $conditions
@param string $count
@return int
Executes a COUNT query to receive the rows number