Вычисляем индекс элемента в блоке и присваиваем блоку нужный .class
$(document).ready(function () {
$(".has-drop__drop").each(function() {
if ($(this).children("li").last().index() < 9) {
$(this).addClass("has-drop__drop--1");
} else if ($(this).children("li").last().index() < 19) {
$(this).addClass("has-drop__drop--2");
} else {
$(this).addClass("has-drop__drop--3");
}
});
});