code: public int getCount() {
  		if (metadata != null && metadata.get("count") != null) {
  			return Integer.parseInt(metadata.get("count"));
  		}
  		
  		if (entities == null && entity !=null) {
  			return 1;
  		}
  		
  		return 0;
  	}
docs: Count ithe number of record returned
  @return number of records in the response