public function countBySubQuery($conditions = false)
    {
        $this->andWhere($conditions);
        return (int)$this->db->fetchColumn($this->getSqlForCount(), $this->params);
    }
public function countBySubQuery($conditions = false)
    {
        $this->andWhere($conditions);
        return (int)$this->db->fetchColumn($this->getSqlForCount(), $this->params);
    }
public function countBySubQuery ( $ conditions = false ) { $ this -> andWhere ( $ conditions ) ; return ( int ) $ this -> db -> fetchColumn ( $ this -> getSqlForCount ( ) , $ this -> params ) ; }
Executes a sub query to receive the rows number

@param mixed $conditions
@return int
Executes a sub query to receive the rows number