public function getComments() { $commentRepository = $this->em->getRepository('Newscoop\\Entity\\Comment'); return $commentRepository->createQueryBuilder('c')->select('COUNT(c)')->getQuery()->getSingleScalarResult(); }