  We apply the Niemi-Semenoff index theorem to an s-wave superconductor
junction system attached with a magnetic insulator on the surface of a
three-dimensional topological insulator. We find that the total number of the
Majorana zero energy bound states is governed not only by the gapless helical
mode but also by the massive modes localized at the junction interface. The
result implies that the topological protection for Majorana zero modes in class
D heterostructure junctions may be broken down under a particular but realistic
condition.
