code: public function countPost($actor)
      {
          $em = $this->container->get('doctrine')->getManager();
          $entities = $em->getRepository('BlogBundle:Post')->findBy(array('actor' => $actor));
          
          return count($entities);
      }
docs: Returns integer counter
  
  @param object $actor