I would like to be able to count the amount of records returned in another query. Using SQL it's easy:
select count (*)
from (
select count(first_name)
from users
group by first_name) as temp
Does anyone have any idea how can I do that using HQL?