Personal I have the following query done.
$ent->createQueryBuilder('t')
->select('count(t.id)')
->join('t.categoria', 'c')
->join('t.noticia', 'n')
->groupBy('n.id')
->where('n.posicao=1')
->andWhere('c.id=16')
->andWhere(' t.deleted_at IS NULL OR LENGTH(t.deleted_at) = 0')
->getQuery()
->getSingleScalarResult();
So she's not just returning me a column with the count. I believe it's because of groupBy. How do I set it to return only the count total without taking out the groupBy. Thanks