Let $C$ be a circle $\gamma=\partial B (0,2)$ oriented positively.
I have to calculate $$\int_\gamma \frac{-\cos(1/z)}{\sin(1/z)z^2}dz$$
My attempt:
Notice that $\sin(1/z)$ is meromorphic inside and on $\gamma$ and doesnt have any poles on $\gamma$.
Moreover, $[\sin(1/z)]'=\frac{-\cos(1/z)}{z^2}$ (in neighbourhood of $\gamma$).
I will use now the Argument Principle. $f(z)=\sin(1/z)$ has only one pole (at $0$) inside $\gamma$ [obviously its not a pole, but essential singularity].
On the other hand, $f(z)$ has countably many zeros inside $\gamma$, at points $z=\frac{1}{k\pi}, k\in\mathbb{Z}$. I'm stuck now.
So integral $\int_\gamma \frac{-\cos(1/z)}{\sin(1/z)z^2}dz$ is not finite?
Edit: I want to solve this using argument principle on "raw" integral.
$$\int_{\gamma}\frac{-\cos(1/z)\,dz}{z^2\sin(1/z)} = \int_{|w|=\frac{1}{2}}\cot w\,dw = 2\pi i\cdot\text{Res}\left(\cot w,w=0\right)=\color{red}{2\pi i}.$$