count of class in jquery code example
Example 1: get count of div by class
var numItems = $('.item').length;
Example 2: get count of class which is visible element
$(".level1:visible").length;
var numItems = $('.item').length;
$(".level1:visible").length;