get count of class in jquery code example Example: count all elements with class jquery var numItems = $('.item').length;