title: hql select from select problem
body: <p>I would like to count the number of groups of a group by statement. 
  In SQL that would look like:</p>
  
  <pre><code>select count(*) from (select count(*) from MyTable t group by t.col1, t.col2) g
  </code></pre>
  
  <p>But in HQL it seems I can not do a select in a select as I did in the previous sql. I guess the problem is that <code>Hibernate</code> does not support subquery in the <code>from</code> clause.
  Is there any way to do this in <code>hql</code>? </p>