LoZ and AoL do not just count deaths, but also how many tries it has taken one to get to the point in which they are at. So, if a person is at, say, Dungeon 6 in LoZ, and has 19 deaths, and also had times where he played through 6 sittings without dying, but then later quit and saved, then the count at the file screen will be "025."
ALttP only counts deaths, or at least I know the GBA port does. The deaths counted are the ones where you actually see the "Game Over" screen. If you have a fairy with you and you die, your death count will not go up. How it works on the original SNES cartridge, I do not know.
LA counts deaths, as well as OoT and MM. I believe that's all the games that count one's deaths and tries. I haven't played OoS or OoA, so I don't know about those two.