Are we also counting divs inside comments or literals within scripts?

There is a reason this advice is default. The chances an edge case exist are probably a lot higher than anyone is prepared to accept. Even in the "simple" cases.