  Physics of topological materials have attracted much attention from both
physicists and mathematicians recently. The index and the fermion number of
Dirac fermions play an important role in topological insulators and topological
superconductors. A zero-energy mode exists when Dirac fermions couple to
objects with soliton-like structure such as kinks, vortices, monopoles, strings
and branes. We discuss a system of Dirac fermions interacting with a vortex and
a kink. This kind of systems will be realized on the surface of topological
insulators where Dirac fermions exist. The fermion number is fractionalized and
this is related to the presence of fermion zero-energy excitation modes. A
zero-energy mode can be regarded as a Majorana fermion mode when the chemical
potential vanishes. Our discussion includes the case where there is a half-flux
quantum vortex associated with a kink in a magnetic field in a bilayer
superconductor. A normalizable wave function of fermion zero-energy mode does
not exist in the core of the half-flux quantum vortex. The index of Dirac
operator and the fermion number have additional contributions when a soliton
scalar field has a singularity.
