code: private int getJobsCount(String instanceUrl) {
      	int result = 0;
      	
      	try {
              String url = joinURL(instanceUrl, new String[]{JOBS_URL_SUFFIX});
              ResponseEntity<String> responseEntity = makeRestCall(url);
              if (responseEntity == null) {
              	return result;
              }
              String returnJSON = responseEntity.getBody();
              if (StringUtils.isEmpty(returnJSON)) {
              	return result;	            	
              }
              JSONParser parser = new JSONParser();           
              try {
                  JSONObject object = (JSONObject) parser.parse(returnJSON);
                  JSONArray jobs = getJsonArray(object, "jobs");
                  result = jobs.size();
              } catch (ParseException e) {
                  LOG.error("Parsing jobs on instance: " + instanceUrl, e);
              }
          } catch (RestClientException rce) {
              LOG.error("client exception loading jobs", rce);
              throw rce;
          } catch (URISyntaxException e1) {
          	LOG.error("wrong syntax url for loading jobs", e1);
  		}
      	return result;
      }
docs: Get number of jobs first so that we don't get 500 internal server error when paging with index out of bounds.
  TODO: We get the jobs JSON without details and then get the size of the array. Is there a better way to get number of jobs for paging?
  @param 		instanceUrl
  @return		number of jobs