public function count($filters)
    {
        $where = $this->getQueryFilter($filters);
        $query = $this->getEntityManager()->createQuery('SELECT COUNT(m) FROM FulgurioLightCMSBundle:Media m' . $where);
        if (!empty($filters))
        {
            foreach ($filters as $filterKey => $filterValue)
            {
                $query->setParameter($filterKey, $filterValue);
            }
        }
        return $query->getSingleScalarResult();
    }
public function count($filters)
    {
        $where = $this->getQueryFilter($filters);
        $query = $this->getEntityManager()->createQuery('SELECT COUNT(m) FROM FulgurioLightCMSBundle:Media m' . $where);
        if (!empty($filters))
        {
            foreach ($filters as $filterKey => $filterValue)
            {
                $query->setParameter($filterKey, $filterValue);
            }
        }
        return $query->getSingleScalarResult();
    }
public function count ( $ filters ) { $ where = $ this -> getQueryFilter ( $ filters ) ; $ query = $ this -> getEntityManager ( ) -> createQuery ( 'SELECT COUNT(m) FROM FulgurioLightCMSBundle:Media m' . $ where ) ; if ( ! empty ( $ filters ) ) { foreach ( $ filters as $ filterKey => $ filterValue ) { $ query -> setParameter ( $ filterKey , $ filterValue ) ; } } return $ query -> getSingleScalarResult ( ) ; }
Count number of result

@param array $filters
@return Ambigous <\Doctrine\ORM\mixed, mixed, \Doctrine\ORM\Internal\Hydration\mixed, \Doctrine\DBAL\Driver\Statement>
Count number of result