Count elements not containing certain class
How can I count elements .em that do not have section with class .extra?
You were negating
.em elements with a class of
.extra. Since none of the
.em elements have the class
.extra, all of them were selected.
One option would be to combine
:not() with the