title: Using Doctrine DBAL to count number of rows from SELECT query
body: <p>OK so I am looking for a neat and short way to count the number of rows from a SELECT query using Doctrine DBAL.</p>
  
  <p>I know that I could <code>SELECT COUNT(*)</code> but then I need to sort through the array when I fetch results. Alternatively, it's been suggested to look in to <code>getScalarResult()</code>. But I can't seem to find any documentation about this, other than in DQL (which is a different project).</p>
  
  <p>So what is the neatest way to do this? I guess it's because I'm used to the great MySQLI attribute <code>num_rows</code>!</p>