Let $X$ be a topological space with basepoint $x_0$. Define a map $s\colon\pi_1(X,x_0)\to\mathbb{Z}_{\geq 0}$ by $$s([\gamma])=\min\{\text{number of self-intersections of }\gamma'\colon \gamma'\in [\gamma]\}.$$ Has the map $s$ been studied before? Is there some well-established theory about it?
To be specific, for example, how would one prove that if $A$ is annulus, then $$s(n)=\left\{ \begin{array}{ll} 0 & \mbox{if } n = 0 \\ |n|-1 & \mbox{if } n \neq 0 \end{array} \right.$$