title: How to make an API call to https://petstore.swagger.io/v2/pet/findByStatus?status=available and display a count of the number of pets in the result
body: <p>My code so far:
  I called the api using fetch() and converted the data to JSON, but I am not getting the logic to do the count of the number of pets.</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;Petstrore API&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;label&gt;Number of pets:&lt;/label&gt;&lt;br&gt;
      &lt;textarea id=&quot;result&quot;&gt;&lt;/textarea&gt;
      &lt;script&gt;
       const petStore_url = 'https://petstore.swagger.io/v2/pet/findByStatus?status=available'; 
        async function getPetCount() {
        const response = await fetch(petStore_url);
        const data = await response.json(); //Converting response to JSON 
        console.log(data);
        }
        getPetCount();
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
    
  </code></pre>