Winding number: times f(w) goes around unit disc I have a problem which is like this:

Let $S^1=\partial D(0,1)$ and consider a differentiable function $f:S^1\rightarrow S^1$. Can you compute the number of times that $f(w)$ goes around $S^1$ per each time that $w$ goes around $S^1$?

I have tried to reparameterize the first $S^1$ with a $\gamma$ path and then parametrize the second $S^1$ in terms of $f(\gamma)$, but I do not get any further.
Any hints or ideas?
 A: If you have a path $\gamma: S^1\to U\subset \mathbb C$ and a holomorphic function $g:U-\{z_1,...,z_n\}\to\mathbb C$, ($z_1,..,z_n$ not hit by $\gamma$) then the residue theorem tells you that the integral $\int_\gamma g(z)\,dz$ is given by:
$$\int_{\gamma}g(z)\,dz = {2\pi i}\sum_{i}\chi(\gamma,z_i) \ \mathrm{res}_{z_i}g$$
where $\chi(\gamma,z_i)$ is the winding number of $z_i$ wrt $\gamma$. This gives us a connection between integrals we can evaluate and winding numbers.
So let $f:S^1\to S^1$ be our path, assume it can be reparametrised to be piecewise differentiable. Then
$$\frac1{2\pi i}\int_f\frac1z\,dz=\chi(f,0)$$
is the winding of $f$ around $0$. But this expression is nothing other than:
$$\frac1{2\pi i}\int_f\frac1z\,dz=\frac{1}{2\pi i}\int_0^{1}\frac1{f(e^{2\pi i})}f'(e^{2\pi i})\, e^{2\pi i t}\,dt$$
Where $f$ has been reparametrised as a map $[0,1]\to S^1$. Typesetting it nicer:
$$\frac{1}{2\pi}\int_0^{1} \frac{f'(e^{2\pi it})}{f(e^{2\pi it})}e^{2\pi i t}\, dt=\chi(f,0)$$
A: In fact, holomorphic functions/residue theory isn't required. See Baby Rudin, exercises 23-26 of ch. 8. A brief summary:
(1) Given a closed differentiable curve $\gamma:[a,b]\longrightarrow\Bbb C\setminus\{0\}$, let be
$$
\text{Ind}(\gamma) =
\frac1{2\pi i}\int_a^b\frac{\gamma'(t)}{\gamma(t)}\,dt.
$$
(yes, is a disguised line integral)
(2) Considering $\gamma\exp(-\int(\gamma'/\gamma))$ and the periodicity of the complex exponential is easy to prove that $\text{Ind}(\gamma)\in\Bbb Z$.
(3) Compute $\text{Ind}(\gamma)$ for the curves $\gamma(t) = \exp(int)$, $t\in[0,2\pi]$.
(4) Prove (essentially) that the integer-valued $\text{Ind}(\gamma)$ depends continuously of $\gamma$.
(5) Using (4) you can define $\text{Ind}(\gamma)$ for continuous curves.
