Theorem (argument principle)
Suppose $γ$ is a closed curve bounding a domain $U$, and $f$ is meromorphic on $U\cup γ$ with no poles or zeros on $γ$. Then $$ \begin{align*} I(f\circ γ; 0) = \frac{1}{2πi}\oint_γ \frac{f'}{f}\d z = (\#\text{ zeros of $f$ in $U$}) - (\#\text{ poles of $f$ in $U$}). \end{align*} $$ counted with multiplicity (i.e. a zero/pole of order $k$ is counted $k$ times).
-
$f'/f$ is called the logarithmic derivative, which measures the argument of $f$. The argument principle says $2π(\#\text{ zeros} - \#\text{ poles})$ is the change in $\arg f(z)$ as $z$ travels $γ$.
-
Apply to $g(z) = f(z) - c$ to see $$ \begin{align*} I(f\circ γ; c) = \frac{1}{2πi} \oint_γ \frac{f'(z)}{f(z)-c} \d z = (\#f\inv(c)) - (\#\text{ poles of $f$}), \end{align*} $$ counted with multiplicity (the local degree for each preimage of $c$).