Solution (source code)

= Solution

For a continuous loop in $\mathbb C\setminus\{0\}$, choose a continuous argument lift $\theta:[0,1]\to\mathbb R$ with $\gamma(t)/|\gamma(t)|=e^{i\theta(t)}$. Such a lift is constructed by subdividing the interval into pieces whose images lie in an argument chart and matching the arguments at their endpoints. The <winding number of a continuous closed path> is
$$
\boxed{w(\gamma;0)=\frac{\theta(1)-\theta(0)}{2\pi}\in\mathbb Z.}
$$
Changing the initial lift adds one constant multiple of $2\pi$ and does not change this <integer>.