title: How to get number of result pages for the data fetched from Github API for a request?
body: <p>I am not using CURL and only using jQuery, AJAX and JS for getting information from Github API. I am using a URL like this to get information about issues-
  <a href="https://api.github.com/repos/jquery/jquery/issues" rel="noreferrer">https://api.github.com/repos/jquery/jquery/issues</a></p>
  
  <p>But the result comes in multiple pages since Github API uses pagination feature. When using CURL we get to know about the header information in which the number of result pages are also shown but I am not using CURL and directly requesting data from above API url using jQuery and AJAX so I am unable to get the header information for above URL. I want to count the number of open and closed issues and open and closed PRs using the above URL for jquery/jquery repository and some other repositoris as well but since there is a lot of issues for some repositories, I am getting result in multiple pages.</p>
  
  <p>I know about the "page" and "per_page" GET parameter that can be passed through the URL to get that result page and to display a number of results( e.g - 100) per page like this-
  <a href="https://api.github.com/repos/jquery/jquery/issues?page=5&amp;per_page=100" rel="noreferrer">https://api.github.com/repos/jquery/jquery/issues?page=5&amp;per_page=100</a></p>
  
  <p>I don't want to check the number of result pages manually. I want my script to get the number of result pages information automatically so that I can create a loop and iterate through all the pages to get information about all the issues. </p>
  
  <p>e.g. if I get to know that the number of result pages are 8 then I can create a loop like this to get information about all the issues from all the result pages-</p>
  
  <pre><code>var number_of_pages=8;
  var issues_information;
  for(var nof=1; nof&lt;=number_of_result_pages;nof++){
      var URL='https://api.github.com/repos/jquery/jquery/issues?page='+nof+'&amp;per_page=100';
      $.getJSON(URL, function(json)){
          issues_information=json;
      }
  }
  </code></pre>
  
  <p>Where "issues_information" will get JSON data that is fetched from Github API. But I am unable to get the count of result pages for a particular API call.</p>
  
  <p>Can anybody tell me how to get number of result pages from Github API for a request? Please give an example code, URL format etc.</p>