Residue theorem with winding numbers In my studies, I've been uniquely using the Residue Theorem with no more than a single winding around each singularity. Actually, my professor has never mentioned winding-numbers in the Residue Theorem.
I've been reading discussions about complex integrals, where some people suggest solutions that take winding numbers into account. Is there a general advantage in doing so?
 A: I taught a basic complex analysis class 16 times so far. Initially I did not include the winding number, and restricted the residue theorem to simple closed curves. This is visually satisfactory and usually sufficient for applications, but it gives a hard time for the teacher and the careful student alike. The reason is that one needs to talk about "the interior" and "counterclockwise orientation" of a simple closed curve. However, I found that discussing these concepts rigorously is beyond an introductory course. So, after a while, I decided to include the winding number: it simplified the proofs and made the theorem more general. Here is the version I currently teach in my course:
Residue Theorem. Let $M\subset\mathbb{C}$ be open. Let $\gamma\subset M$ be a closed curve freely homotopic to a constant curve within $M$. Assume that $f$ is holomorphic on $M\setminus S$, where $S\subset M$ is a discrete subset of isolated singularities of $f$ disjoint from $\gamma$. Then
$$\int_\gamma f=2\pi i\sum_{p\in S} w_p(\gamma)\mathrm{res}_p(f),$$
where the winding number $w_p(\gamma)$ vanishes for all but finitely many points $p\in S$.
