Generalization of winding number to higher dimensions 
Is there a natural geometric generalization of the winding number to higher dimensions?

I know it primarily as an important and useful index for closed, plane curves
(e.g., the Jordan Curve Theorem),
and for its role in Cauchy's theorem integrating holomorphic functions.
I would be interested to learn of generalizations that essentially
replace the role of the circle $\mathbb{S}^1$ with $\mathbb{S}^n$.
I've encountered references to the Fredholm index,
the Pontryagin index, 
and to Bott periodicity,
but none seem to be straightforward geometric generalizations of winding number.
This is an entirely naive question, and references and high-level descriptions
would be appreciated, and more than suffice.
 A: 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
A: Perhaps it is worth mentioning that in their book "Mapping Degree Theory" Outerelo and Ruiz give a general definition of the winding number based on the topological (Brouwer-Kronecker) degree, which was already mentioned in a previous answer. The point being that, while it is a special case of the mapping degree, it is a generalization of the usual winding number that is interesting on its own.
Theorem-Definition: Let $U\subseteq\mathbb{R}^n$ be bounded and open, let $X:=\partial U$ be the boundary hypersurface, let $f\in C^0(X,\mathbb{R}^n)$, let $\bar{f}:\bar{U}\to\mathbb{R}^n$ be a continuous extension of $f$ (the set of such extensions is non-empty by Tietze's extension theorem), and let $p\in\mathbb{R}^n\setminus f(X)$. Then $\deg(\bar{f},U,a)$ does not depend on the choice of continuous extension $\bar{f}$, and one defines
$$
w(f,a):=\deg(\bar{f},U,a)
$$
The winding number inherits many of the nice properties of the topological degree : being locally constant on the codomain, homotopy invariance, being $0$ for points outside of $\bar{f}(\bar{U})$ and others. More importantly, the smooth version of the topological degree can be recovered from this notion of a winding number.
A: 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: In  your  question  you  mentioned the  word "Fredholm index".
So  I  would  like  to say  that in  the  circle  case  there  are  two  different  interpretations of  Fredholm index  of  certain  linear  operators in terms of  winding  number.  So  it  would  be  interesting  to consider  a  possible  generalization of  these $1$ dimensional  facts  to  higher  dimensional  spheres. 
1)If  I  remember the following theorem correctly, there is a  Theorem  by  Veku  in "Topology and analysis, the Atiyah-Singer index formula and gauge-theoretic physics, by B. Booss and D. D. Bleecker" which  says:
Theorem: If  $X$ is  a  non  vanishing  vector  field along  $S^1\subset \mathbb{R}^2$, not  necessarily tangent  to  $S^1$, then the fredholm  index of the  pair  operator  $(\Delta, \partial/\partial X)$ is  equal  to the  "winding  number of  $X$.  In the above pair operator $\Delta$ is the standard Laplace operator on the interior of circle and the derivational operator  $\partial/\partial X$ is restricted to the boundary.
So  it  would  be  a  good  idea to  consider  an  appropriate  generalization of this  fact. For every smooth self  map  on  sphere  one  can  consider  an  arbitrary extension to  whole  $\mathbb{R}^{n+1}$  and  try  to  find  an  appropriate  generalization. However   an  immediate  plain  generalization is not  true  but  one  should  consider  a modified  generalization. I was  thinking to  this  question  about  7  years  ago  and  I  observed that a  plain  generalization is not  true  since the  corresponding  operator  on $S^3$  is  not  a  Fredholm operator.  I had  intension to  discuss  these  materials in my following talk I presented in  Timisoara but I  did  not  had enough time  to  present all of the materials of this abstract, since my time was 20 minutes:
http://at.yorku.ca/c/b/d/z/37.htm
(Sorry, the talk abstract I wrote is very snafu)
2)  Many  years  ago I  learned  from  a  speaker in  Non  commutative  geometry
that  the  multiplication  by  a  non  vanishing  complex  map $f$  on  $S^1$  is  a  fredholm  operator on  $L^1(S^1)$ whose  index  is $- W(f)$,  the  winding  number  of  $f$.  So it  would  be  interesting  to  consider an $S^3$  analogy  or  even  more  a  compact  Lie  group  analogy.
The  following  paper contains  an explanation of a  similar  situation
http://www.ams.org/journals/proc/2005-133-05/S0002-9939-04-07642-7/S0002-9939-04-07642-7.pdf
A: 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
