the winding number
When a closed loop is drawn in the plane and you fix a point not on the loop, there is a precise integer answer to the question 'how many times does the loop wind around that point?' Counterclockwise circuits count positive, clockwise count negative, and a loop that goes around twice counts as two. This integer is the winding number of the loop about the point — the basic bookkeeping device for everything involving holes.
There is a beautiful integral formula for it. For a closed contour C and a point z0 not on C, the winding number n(C, z0) equals (1 / (2 pi i)) times the integral over C of dz / (z - z0). The factor 1/(z - z0) is the model singular integrand, and this contour integral always comes out to 2 pi i times an integer — exactly the number of net counterclockwise turns. You can also read the winding number geometrically as the total change in the argument of (z - z0) as z runs once around C, divided by 2 pi: each full turn around z0 adds 2 pi to the angle.
Winding numbers are how the general theorems keep score. The homology form of Cauchy's theorem and the residue theorem both weight each singularity by the winding number of the contour about it: the integral around C equals 2 pi i times the sum, over the singular points, of (winding number about that point) times (residue there). So before computing residues you read off, for each pole, how many times your contour loops around it — usually 0 (outside), or +1 (enclosed once, counterclockwise). The winding number turns 'which holes does this loop catch, and how often' into a hard number you can put into a formula.
For the circle z(t) = z0 + e^(i t), t from 0 to 2 pi, the winding number about z0 is (1/(2 pi i)) times the integral of (i e^(i t) / e^(i t)) dt = (1/(2 pi i)) times the integral of i dt from 0 to 2 pi = (1/(2 pi i))(2 pi i) = 1. Going around twice (t up to 4 pi) gives 2; reversing direction gives -1.
The winding number of a circle about its center is +1; it is always an integer.
The winding number is always an integer and is constant on each connected region of the plane left by removing the curve — it can only jump as you cross the curve itself.