title: Hibernate Criteria: Projecting Count with group by clause
body: <p>I want to execute the following SQL</p>
  
  <pre><code>select count(*) as myCount from user group by name;
  </code></pre>
  
  <p>I came up with the following criteria for the same</p>
  
  <pre><code>DetachedCriteria.ForClass(typeof(UserDTO))
      .setProjections(Projections.ProjectionList()
                          .Add(Projections.rowCount(),"myCount")
                          .Add(Projections.groupProperty("this.name"));
  </code></pre>
  
  <p>I get the result back as pair of the count and name,How can I get just the count from this.</p>