Hibernate: Made count() more efficient and added to abstract DAO