title: Wordpress posts count with comman tags within specific category
body: <p>i have two categories 'A' and 'B'. Both have 5 posts(each) with tag 'C'. How i can display the number of posts as 5 in Category 'A' or 'B' page. It showing total number of post with tag 'C' as 10. I need to show it as 5. How i can pass category variable to display exact count with tag within specific category. Here is my current code:</p>
  
  <pre><code>$tag = get_term_by('name', $tags,'post_tag');
  $count = $tag-&gt;count;
  </code></pre>
  
  <p>reference: <a href="https://codex.wordpress.org/Function_Reference/get_term_by" rel="nofollow noreferrer">https://codex.wordpress.org/Function_Reference/get_term_by</a></p>