Generalized Winding Number