Session session=this.getSession;
string hql="select count(tb) from table tb";
Query query=session.createQuery(hql);
int count=(Integer)query.uniqueResult();
Session session=this.getSession;
string hql="select count(tb) from table tb";
Query query=session.createQuery(hql);
int count=(Integer)query.uniqueResult();