We study the axial and parity anomalies in Abelian gauge theories using the direct yet intuitive approach of counting the relative number of states of one chirality with respect to the other. A fundamental gauge-invariant quantity, the determinantal ratio, is introduced for this purpose. We find that the number of states is conserved and that the gauge fields differentially phase shift states of opposite chirality at infinite energies. This implies a relative flow of states at very large energies which must be compensated by a rearrangement of the density of states at finite energies. We then derive a sum rule which yields two alternative formulas for the index of a Dirac operator. One expresses the index in terms of its high-energy behavior, and the other in terms of the low-energy properties; these are the ``zero modes'' of definite chirality. Two examples are worked out in detail to clarify our general result. The physics of the axial anomaly is shown to translate into that of the parity anomaly in 2+1 dimensions, in which parity and chirality have interchanged roles. We also analyze the vacuum charge in regard to its high- and low-energy origin. The possibility of spectral flow is formulated and briefly discussed. In short, we provide a physical interpretation of certain mathematical indices, relate them to an extended version of Levinson's theorem of potential scattering, and simplify their evaluation.