JS Получите количество занятий в HTML
VanillaJS
document.querySelectorAll('#main-div .specific-class').length;
jQuery
$('#main-div .specific-class').length
Blue Duck
VanillaJS
document.querySelectorAll('#main-div .specific-class').length;
jQuery
$('#main-div .specific-class').length