BlogBundle/Twig/BlogExtension.php
public function getBlogTotalItems($categoryId=null)
    {
        $em = $this->container->get('doctrine')->getManager();
        $total_items = $em->getRepository('BlogBundle:Post')->countTotal($categoryId);
        
        return $total_items;
    }
public function getBlogTotalItems($categoryId=null)
    {
        $em = $this->container->get('doctrine')->getManager();
        $total_items = $em->getRepository('BlogBundle:Post')->countTotal($categoryId);
        
        return $total_items;
    }
Returns integer

@param itenger $total_items