We learn in complex analysis class how to find the winding number of the contour $\Gamma$ around the origin. \[ n = \frac{1}{2\pi i} \oint \frac{dz}{z} = \frac{1}{2\pi i} \oint d(\log z) = \frac{1}{2\pi } \oint d\theta \] My goal had been to count the number of self-intersections of curves. I guessed some integral over a torus $\Gamma \times \Gamma$ which would have a pole-like object whenever $z_1 = z_2$. In the back of my mind, I worried maybe integrating along $t_1 = t_2$ would have zero contribution. \[ \frac{1}{2\pi i} \oint \oint \frac{dz_1 dz_2}{z_1 - z_2} \]
Inspired by Kontsevich's integral for knots (and some more recent papers), I learned of something that comes close \[ \frac{1}{2\pi i} \oint \oint \frac{dz_1 - dz_2}{z_1 - z_2} = \frac{1}{2\pi i} \oint \oint d \log(z_1 - z_2) = \frac{1}{2\pi i} \oint \oint \arg (z_1 - z_2) \] So formulas like these are measuring how the chords of curves wind around each other. This seems to be known as the Whitney invariant for plane curves, counting signed self-intersections.
Is there a way to get self-intersections all of the same sign? This must be related the Vassiliev invariants as well, but I'd like to focus on plane curves.