Generalization of winding number to higher dimensions

This is a very naive answer which I am sure you already considered, but isn't the most obvious generalization just given by the topological degree (https://en.wikipedia.org/wiki/Degree_of_a_continuous_mapping)?

The winding number of $f:S^1\rightarrow \mathbb{R}^2$ around $p$ is just the degree of the composition of $f$ with the radial projection from $p$, considered as a map from $S^1$ to $S^1$. It is obvious how to do the same thing for general $n$.

(This should surely just be a comment.)


A smooth function $f$ with image on the unit circle in $\mathbb{C}$ has winding number: $$\text{wind} f=\frac1{2\pi i}\int f'\bar{f}=\frac1{2\pi i}\sum\hat{f'}(n)\hat{f}(n)=\sum n\vert\hat{f}(n)\vert^2.$$ This formulation allows generalizing the winding number to higher dimensions (eg. $f:\mathbb{S}^n\rightarrow\mathbb{S}^n$) for functions in Sobolev spaces $H^{1/2}$. Notice the natural fit of this space via the characterization of $f\in H^{1/2}$ through its Fourier coefficients: $$\sum \vert n\vert\,\vert\hat{f}(n)\vert^2<\infty.$$ The first result in this direction was due to L. Boutet de Monvel and O. Gabber. Since then the concept was extended as "degree of a map" (obviously the Topologist were aware of topological degree) much further to VMO spaces, etc. A good survey of results and developements on the subject can be found here:

Haïm Brezis, New questions related to the topological degree, The unity of mathematics, 137–154, Progr. Math. 244, Birkhäuser Boston, Boston, MA, 2006


The linking number is one of a natural generalizations of the winding number, see my answer to a related question: https://mathoverflow.net/a/297440/121665