<div class="block">
<div class="active"></div>
<div class="active"></div>
<div class="active"></div>
<div class="active"></div>
<div class="active"></div>
</div>
const count = $('.block').find('.active').length
console.log(count) // 5
for(let i = 0; i < 3; i++) {
console.log(i)
}
// 0
// 1
// 2
label
input
span
input ~ span {}
input:checked ~ span {}