title: Symfony2 & Doctrine - Get number of rows returned from datasource
body: <p>I have the following code in my Symfony2 Repository Class...</p>
  
  <pre><code>$query = $this-&gt;createQueryBuilder('foo')
          -&gt;where('foo.bar = :id')
          -&gt;setParameter('id', $myID)
          -&gt;getQuery();
  </code></pre>
  
  <p>How do I get the number of rows found by the database?</p>
  
  <p>Thanks in advance</p>