jQuery count number of divs with a certain class? March 25, 2023 by Tarik You can use the jquery .length property var numItems = $('.item').length;