jQuery count each element with the same class code example Example: get count of div by class var numItems = $('.item').length;