The best way to do a count would be to do it:
Code:
Criteria crit = sess.createCriteria(EmailList.class,"emailist")
.createAlias("groupMap","groupMap")
.add( Restrictions.like("email", "%"+keyword+"%") )
.add( Restrictions.like("groupId", groupId) )
.add( Restrictions.like("companyId", companyId) ) .setProjection(Projections.rowCount());
Integer obj = (Integer) crit.uniqueResult();
That'll get you what you're looking for.
Also, i am fairly certain you don't have to do the "%"+keyword+"%" in your clause, the Restrictions.like() functionality should take care of escaping strings for you.
-B