How to count the total zeros of a complex polynomial outside a closed curve? Set up
Suppose $\gamma$ a simple closed curve, oriented in a counterclockwise direction. $f(z)$ is a complex polynomial
$$
f(z)=a_nz^{n}+a_{n-1}z^{n-1}+\cdots+a_0.
$$
We already know that the integral
$$
N=\frac{1}{2\pi i}\oint_{\gamma}{\frac{f'(z)}{f(z)}dz}
$$
which we called the winding number, gives the total zeros $N$ of $f(z)$ inside the closed curve $\gamma$. Now I want to know the total zeros $M$ outside $\gamma$ and this can be done exactly by the fundamental theorem of algebra, which leads to
$$
M=\mathrm{total\ zeros\ of}\ f(z)\ \mathrm{in\ whole\ plane}\ -N.
$$
My question is: is there an "integral way" instead of the "algebraic way" to count the number of zeros $M$ outside $\gamma$  like what we did for $N$?
 A: This is just an extended comment to answer your concerns. Maybe it's helpful to treat $f$ as a black-box function, where all we know is that it's meromorphic on $\mathbb CP^1$ (of course, this means it's actually rational, but let's suppress that for now). In particular, we happen to know there's a pole at $\infty$. We can calculate the order by taking a sufficiently small circle around it (ie, a sufficiently large circle) that doesn't contain any other zeroes or poles of $f$. Then we can calculate the mentioned integral, call it $-n$. By symmetry, $n$ will equal the number of zeroes $-$ poles on the other side of the circle, ie all the others besides $\infty$. If we know $f$ is entire on $\mathbb C$ this tells us that the total number of zeroes of $f$ is equal to the order of the pole at $\infty$, and we can calculate this quantity directly with an integral on a sufficiently large circle, which is what you wanted.
A: Yes: change variables to $w = 1/z$.  Then $f(z) = f(1/w)$ has an
a pole of multiplicity $n$ at $w=0$, and a zero at $1/z$ for each zero
$z$ of $f$.  The zeros $z$ not enclosed by $\gamma$ are precisely
those for which $1/z$ is enclosed by the image of $\gamma$ in the $w$-plane.
But the path switches orientation when we go from $z$ to $w$,
so the integral is $-N$, which recovers $M = n - N$
(since that $-N$ is $M$ minus the multiplicity of the pole at $w=0$).
