It would seem judging by the hibernate 3.3 to 3.5 migration guide that the count and countDistinct projections now return longs.
https://community.jboss.org/wiki/HibernateCoreMigrationGuide35
Quote:
Numeric aggregate Criteria projections now return the same value type as their HQL counterparts. As a result, the return type from the following projections in org.hibernate.criterion have changed:
"count" and "count distinct" projections now return a Long value (due to changes in CountProjection, Projections.rowCount(), Projections.count( propertyName ), and Projections.countDistinct( propertyName )).