  We generalize the idea of the quantized Hall current to count gapless edge
states in topological materials, applying equally well to theories in different
dimensions, with or without continuous symmetries in the bulk or chiral
anomalies on the boundaries. This current is related to the index of the
Euclidean fermion operator and can be calculated via one-loop Feynman diagrams.
Quantization of the current is shown to be governed by topology in phase space,
and the procedure can be applied to topological classes governed by either
${\mathbb Z}$ or ${\mathbb Z}_2$ invariants. We analyze several explicit
examples of free fermions in relativistic field theories. We speculate that it
may be possible to extend the technique to interacting theories as well, such
as the interesting cases where interactions gap the edge states.
