To solve you problem you need to get in result SQL Query(which is generated from hibernate criteria) that will look like this:
SELECT xxx.*,count(yyy.FOREIGN_KEY_FIELD) as count FROM XXX xxx left join YYY yyy on (yyy.FOREIGN_KEY_FIELD=xxx.PRIMARY_KEY_FIELD) group by xxx.PRIMARY_KEY_FIELD order by count
Probably for this case you need to use hibernate query api. Criteria is created for Entities and return only list of entities and some projections. In hql it will look very similar to:
select xxx,count(yyy.FOREIGN_KEY_FIELD) as count from XXX xxx left join xxx.yyy yyy group by xxx.PRIMARY_KEY_FIELD order by count
HQL is more flexible for such queries.