public static int pageCount(String hql, String paras[]) {
		Session s = null;
		Transaction tx = null;
		int pageCount = 0;
		try {
			s = HibernateUtil.openSession();
			;
			tx = s.beginTransaction();
			Query q = s.createQuery(hql);
			if (paras != null && paras.length != 0) {
				for (int i = 0; i < paras.length; i++) {
					q.setString(i, paras[i]);
				}
			}
			List<Long> list = q.list();
			if (list.size() == 1) {
				Long row = list.get(0);
				int rows = row.intValue();
				if (rows % 3 == 0) {
					pageCount = rows / 3;
				} else {
					pageCount = rows / 3 + 1;
				}
			}
			tx.commit();
		} catch (Exception e) {
			if (tx != null) {
				tx.rollback();
			}
			throw new RuntimeException(e.getMessage());
			// TODO: handle exception
		} finally {
			if (s != null && s.isOpen()) {
				s.close();
			}
		}
		return pageCount;
	}