title: How to count the number of matching results on a search table
body: <p>I have made a HTML table with a search function. I want to display the matching result amount when searching, and the total amount when search field is blank. I tried with <code>.length</code> but it counted all rows included hidden ones.</p>
  
  <p>How can I count only the displayed rows?</p>
  
  <p><a href="http://jsfiddle.net/revzephyr/b42vn2nh/16/" rel="nofollow noreferrer">jsfiddle</a></p>
  
  <p>I'm currently using this code:</p>
  
  <pre><code>//testing: count number of results
  var rowCount = $('#search-table &gt;tbody &gt;tr').length;
  document.getElementById('count').innerHTML = rowCount;
  </code></pre>
  
  <p>Thank you in advance.</p>