Number of zeros equals number of poles The following is an old qualifying exam problem I cannot solve:
Let $f$ be a meromorphic function (quotient of two holomorphic functions) on an open neighborhood of the closed unit disk. Suppose that the imaginary part of $f$ does not have any zeros on the unit circle, then the number of zeros of $f$ in the unit disk equals the number of poles of $f$ in the unit disk.
It seems this problem begs Rouche's theorem, but I cannot seem to apply it correctly.
 A: This is not quite Rouche though everything in the end boils down to the Cauchy integral formula.  To count zeros and poles you pass to the logarithmic derivative i.e. $\frac{f'}{f}$ and then integrate over the unit circle (which you are allowed to do since $f$ does not vanish there by hypothesis). Why you can take a continuous branch of the log is explained in the answer by @Sourav.
A: The imaginary part of $f$ is never zero on the unit circle and hence $f(\partial \mathbb{D})$ never becomes zero that is never crosses the Real axis. This in turn means that as $z$ traverses counterclockwise along the unit circle, $f(z)$ never makes a complete rotation around the origin. 
This is another form of the argument principle which states that: the number of zeros - the number of poles of a meromorphic $f$ inside a simple closed curve ($f$ cannot be zero on the curve) = $\frac{1}{2\pi } \times$(change in $\arg{f(z)}$ as z traverses around the curve counterclockwise) = number of times $f$ winds around zero counterclockwise. 
Here as we saw, $f$ never winds around zero while traversing the unit circle, hence the number of zeros equals the number of poles of $f$ inside the unit disk.
