  We prove a general Levinson's theorem for Schr\"odinger operators in two
dimensions with threshold obstructions at zero energy. Our results confirm and
simplify earlier seminal results of Boll\'e, Gesztesy et al., while providing
an explicit topological interpretation. We also derive explicit formulas for
the wave operators, and so show that they are elements of a $C^*$-algebra
introduced by Cordes. As a consequence of our approach, we provide an
evaluation of the spectral shift function at zero in the presence of
$p$-resonances.
