When a heavy lepton decays, one of its resulting particles is always
its matching neutrino. The other resulting particles can be any lepton
plus its antineutrino or
alternatively any quark and its antiquark.
If we assign electron number +1 to electrons and electron-type neutrinos, -1 to positrons and electron-type antineutrinos, and zero to all other particles, then electron number is conserved in all processes. Similarly muon number and tau number can be defined.
For example, consider the decay of the muon: