title: Symfony 2 Doctrine COUNT
body: <p>I have in my table "Artiste" one column "valideAdmin" who takes value 1 or 0.</p>
  
  <p>I try to make a simple count to return the number of entries in my table where "valideAdmin" is to 1:</p>
  
  <pre><code>    $repo = $this   -&gt;getDoctrine()
                      -&gt;getManager()
                      -&gt;getRepository('ProjectMainBundle:Artiste');
  
      $qb = $repo-&gt;createQueryBuilder('valideAdmin');
      $qb-&gt;select('COUNT(valideAdmin)');
      $qb-&gt;where('valideAdmin=1');
  
      $count = $qb-&gt;getQuery()-&gt;getSingleScalarResult();
  
      return array(
          'count' =&gt; $count
      );
  </code></pre>
  
  <p>But it always "1" who's return...</p>
  
  <p>Without where clause, I have the total count of the entries of the table, but valideAdmin can be 0 or 1. I only want the count number where valideAdmin=1</p>
  
  <p>Thanks for help</p>