title: Doctrine: how to return the row count of a records in a groupby statement
body: <p>Seems like such a simple thing, but I can't get my query to return the number of records in a group.  Here's my statement:</p>
  
  <pre><code>public function getGroupCount($user_id)
  {
      $q = Doctrine_Query::create()
          -&gt;select('ss.*')
          -&gt;from('SalarySurvey ss')
          -&gt;where('ss.user_id=?', $user_id)
          -&gt;groupBy('created_at')
          -&gt;execute();
      return $q-&gt;rowCount();
  }    
  </code></pre>
  
  <p>rowCount() does not work in the above query.</p>
  
  <p>It might also be helpful to know that this is being used in a foreach statement.</p>