title: criteria.setProjection(Projections.rowCount()) with Hibernate produces unexpected result
body: <p>We are using hibernate 3.3 for our application and facing this weired problem in which </p>
  
  <pre><code>Criteria criteria = getSession().createCriteria(table.class);
  </code></pre>
  
  <p><code>criteria.setProjection(Projections.rowCount());</code> returns 4 rows, 3 having values '0' and 1 with correct value.</p>
  
  <p>Because of this issue <code>criteria.uniqueResult();</code> throws an exception saying <code>org.hibernate.NonUniqueResultException: query did not return a unique result: 4</code></p>
  
  <p>Any help would be highly appreciated.</p>
  
  <p>Thanks in advance.</p>