You can use the :visible selector and .length like this:
var numOfVisibleRows = $('tr:visible').length;
If the <table>
itself isn't visible on the screen (:visible returns false if any parent is hidden, the element doesn't have to be hidden directly), then use .filter(), like this:
var numOfVisibleRows = $('tr').filter(function() {
return $(this).css('display') !== 'none';
}).length;