Doctrine 1

Doctrine_Query::getCountQuery() produces subquery if the query contains joins