jquery count the number of specific elements with class code example Example: get count of div by class var numItems = $('.item').length;