It depends... Different people count it different ways...
The way I see it, it depends on whether you are wanting to keep track of your flock's fertility or your own incubating skills. Like, if you set 100 eggs but only hatched 10 chicks, saying you got a 10% hatch rate sounds pretty poor. But if 90 of your 100 eggs were not fertilised, they had zero chance of ever developing in the first place, and of the eggs that were viable, you actually had a hatch rate of 100%, which sounds a lot better. So as an explanation of flock fertility, you would use the 10% figure, but as an explanation of your incubating skills, you would use the 100% figure.
I keep track of both figures. I remove non-developers from my bator at day 6, and if anyone asks me my hatch rate, I count the number of chicks hatched out of the number of eggs that started developing. I don't count infertile eggs, but I do count blood rings, as you only ever get blood rings in fertilised eggs.
There's no right or wrong way of counting though, and that's just what I see as the most sensible way of doing it. In any discussion of hatch rates, you should probably ask upfront how folk are counting, just to be sure you're comparing the same things.