There is a formula for the simple closed curve $\gamma(t)$ and complex polynomial $p(z)$. The winding number of $p(\gamma)$ around (0,0) is the sum of roots counting multiplicity of $p(z)$ within the closed curve $\gamma(t)$. This is just a direct result from the argument principle.
Now I want to ask what if the closed curve $\gamma(t)$ is NOT simple anymore which means it may have self-intersections. What will the winding number $w(p(\gamma),(0,0))$ be? I think it should be still related to the roots of $p(z)$
The winding number of $p \circ \gamma $ with respect to $0$ is $$ I(p \circ \gamma,0) = \frac{1}{2\pi i}\int_{p \circ \gamma} \frac{dw}{w} = \frac{1}{2\pi i}\int_\gamma \frac{p'(z)}{p(z)} \, dz $$ and that can be computed with the Residue theorem. If $a_1, \ldots, a_m$ are the distinct roots of $p$ with multiplicities $k_1, \ldots ,k_m$, then $$ \frac{1}{2\pi i}\int_\gamma \frac{p'(z)}{p(z)} \, dz = \sum_{j=1}^m I(\gamma, a_j) \operatorname{Res}(\frac{p'}{p}, a_j) \, . $$ It is relatively easy to compute that the residue of $p'/p$ at a $k$-fold zero of $p$ is $k$, so that $$ I(p \circ \gamma,0)= \sum_{j=1}^m I(\gamma, a_j) k_j \, . $$ This is the general formula.
For a simple positively oriented closed curve $\gamma$ the winding numbers $I(\gamma, a_j)$ are either zero or one, and the sum reduces to $$ I(p \circ \gamma,0) = \sum_{a_j \text{ inside } \gamma} k_j $$