title: Zend Framework 2 and SELECT count(*) query
body: <p>I'm trying to do a query like this using Zend Framework 2:</p>
  
  <pre><code>SELECT count(*) as num FROM mytable
  </code></pre>
  
  <p>Here's the code I'm using to build my select statement (bear in mind I've imported the necessary classes):</p>
  
  <pre><code>$select = new Select();
  $select-&gt;from('mytable')
         -&gt;columns(array('num'=&gt;'count(*)'), false);
  </code></pre>
  
  <p>This code doesn't work because the resulting query is as follows:</p>
  
  <pre><code>SELECT [count(*)] AS [num] FROM [mytable]
  </code></pre>
  
  <p>...which throws the following error:</p>
  
  <pre><code>Invalid column name 'count(*)'
  </code></pre>
  
  <p>This is caused by the square brackets around count(*). How can I get this to work properly, basically to have count(*) instead of [count(*)] in the SQL. Also, I know that you can do it with just a regular query, but I need this to work with the Select object. As far as I know, this used to work with the previous versions of Zend, I've seen plenty of solutions for those, but nothing for Zend Framework 2.</p>