title: COUNT and GROUP BY using Zend Framework 2 and tableGateway
body: <p>In Zend Framework 2, using tableGateway, I want to run the following SQL query:</p>
  
  <pre><code>  SELECT categories.category_name, COUNT(forums.forum_id)
      FROM categories LEFT JOIN forums
        ON categories.category_id = forums.category_id
  GROUP BY categories.category_name;
  </code></pre>
  
  <p>Problem is that I simply don't know how to do it. I know how to use <code>$select-&gt;join()</code> for example, but I can't figure out how to also do a <code>COUNT</code> and <code>GROUP BY</code>.</p>
  
  <p>What I want with my SQL: I have 2 tables; <code>categories</code> and <code>forums</code>. I want to select all the categories from <code>categories</code> and for each category I want the amount of forums.</p>