code: public int fetchDataAllCount(QueryConditonDatakey qcd) {
  		Debug.logVerbose("[JdonFramework]--> execute fetch all count for sql sentence: " + qcd.getSqlquery(), module);
  		Connection c = null;
  		PreparedStatement ps = null;
  		ResultSet rs = null;
  		int ret = 0;
  		try {
  			c = dataSource.getConnection();
  			ps = c.prepareStatement(qcd.getSqlquery(), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
  
  			jdbcUtil.setQueryParams(qcd.getQueryParams(), ps);
  
  			rs = ps.executeQuery();
  			if (rs.first()) {
  				ret = rs.getInt(1);
  			}
  		} catch (SQLException se) {
  			Debug.logError(se, module);
  		} catch (Exception ex) {
  			Debug.logError(ex, module);
  		} finally {
  			if (rs != null)
  				try {
  					rs.close();
  				} catch (SQLException quiet) {
  				}
  			if (ps != null)
  				try {
  					ps.close();
  				} catch (SQLException quiet) {
  				}
  			if (c != null)
  				try {
  					c.close();
  				} catch (SQLException quiet) {
  				}
  		}
  		Debug.logVerbose("[JdonFramework]--> fetchDataAllCount is" + ret, module);
  		return ret;
  	}
docs: /*
  (non-Javadoc)
  
  @see
  com.jdon.model.query.PageIteratorJDBC#fetchDataAllCount(java.lang.Object,
  java.lang.String)