title: Hibernate query using criteria and projections
body: <p>I have a SQL query like this</p>
  
  <pre><code>SELECT DESTINATION_NAME, IG_ID, COUNT(FORMATS) AS "NUMBER_OF_FORMATS" FROM 
  requests GROUP BY DESTINATION_NAME, IG_ID
  </code></pre>
  
  <p>I am using hibernate and trying to build a query using criteria.</p>
  
  <pre><code>session.createCriteria(MyTable.class)
  .setProjection(Projection.projectionList()
  .add(Projections.rowCount() 
  .add(Projections.groupProperty("destinationName") 
  .add(Projections.groupProperty("igId")
   )
  .list()
  </code></pre>
  
  <p>I am not sure how to count number of formats here. Projection.rowCount() wont serve the purpose. How should i modify my criteria? </p>