src/Validation/Laravel/DoctrinePresenceVerifier.php
protected function createCountQuery($collection, $alias = 'o') {
        return $this->getEntityManager()->createQueryBuilder()
            ->select('COUNT(' . $alias . ')')
            ->from($collection, $alias);
    }
protected function createCountQuery($collection, $alias = 'o') {
        return $this->getEntityManager()->createQueryBuilder()
            ->select('COUNT(' . $alias . ')')
            ->from($collection, $alias);
    }
Creates a query builder.

@param string $collection
@param string $alias
@return QueryBuilder