I would guess it was well known by the time of Cauchy. But are there earlier references to it?
Grünbaum and Shephard suggest that the winding numbers (for closed polygons) have been discussed in the literature at least since 1769.
See A.L.F. Meister, Generalia de genesi figurarum planarum et inde pendentibus earum ajfectionibus, Novi Comm. Soc. Reg. Scient. Gotting. 1 (1769/70), pp. 144-180.