wait what?
You only get one question, and can only ask one (only one speaks)
A is safe B is death
You ask (with your method) is door A safe.
You ask lying head, he doesn't add 1, the switching head is lying too the majority is wrong, but their lying so they don't add one answer = 0
You ask lying head, he doesn't add one, the witching head is telling truth, majority right doesn't add one as he's lying answer = 0
You ask truthful head, he adds 1, switching head is lying, majority not correct answer =1
You ask truthful head, he adds 1, switching head telling truth majority correct answer =2
You can get 0, 1 and 2 with your method and thats just if you chose the safe door to ask about.
The switching head breaks the riddle.