title: How to check if wp_query results found any custom post_type?
body: <p>In my WordPress v5.8.1, I have the below query in <code>taxonomy.php</code> to get the list of posts.</p>
  <pre><code>$args = array(
   'post_type' =&gt; array('song', 'dance'),
   'post_status' =&gt; 'publish',
   'posts_per_page' =&gt; 10,
   );
   query_posts($args);
  </code></pre>
  <p>The query return posts from both <code>post_type</code>'s.</p>
  <p>I would like to create a menu in the same page, where I want to check if the query results has found posts from a specific <code>post_type</code>. The menu looks something like this.</p>
  <ul>
  <li><p>This taxonomy has posts from Song, Dance (if found posts from both post_type's), or</p>
  </li>
  <li><p>This taxonomy has posts from Song (if found posts from Song post_type only)</p>
  </li>
  </ul>
  <p>Have tried the below within the loop:</p>
  <pre><code>    $song_count = wp_posts_count('song')-&gt;found_posts;
      $dance_count = wp_posts_count('dance')-&gt;found_posts;
       if ($song_count=&gt;0 {
       /** code goes here **/
      }
  </code></pre>
  <p>Above is returning the count from entire WordPress, not just from current taxonomy.</p>