private int countResults(ResultSet result) {
		
		if (result == null) {
			return -1;
		}
		
		int noof = 0;
		try {
			while (result.next()) {
				noof++;
			}
		} catch (Exception ex) {}
		
		return noof;
		
	}