The documentation states that projections and aggregations are only available through HQL for version 2.1.x
It looks like criteria.count existed for a moment but that it has been removed from the API.
Read at the bottom (maybe that's the patch you were refering to)
http://opensource.atlassian.com/project ... wse/HB-474
If you upgrade to hibernate version 3.0, it does support aggregations through its criteria API.
If this is the case, you do that using criteria.setProjection(Projections.count("field"))
Good luck