It is well-known that, when mapping $|\vec{n}(\vec{x})|=1$, we can use $N=\int{\mathrm{d}x_1\mathrm{d}x_2\vec{n}\cdot(\partial_1\vec{n}\times\partial_2\vec{n})}$ to calculate the topological winding number, which is integer-valued since $\pi_{2}(S^2)=\mathbb{Z}$.
We also have homotopy group $\pi_{3}(S^2)=\mathbb{Z}$. For this case, do we have the calculation formula of the integer-valued topological number $\mathbb{Z}$ ?
There is such a formula: the Gauss formula for linking number.
Consider $f : S^3 \to S^2$. Applying Sard's Theorem, after a small homotopy of $f$ we may assume that $f$ is smooth and that all but finitely many points of $S^2$ are regular values of $f$. Given a regular value $p \in S^2$, its inverse image $L_p = f^{-1}(p)$ is a link in $S^3$, and $L_p$ has a natural orientation (defined so that the induced transverse orientation is preserved by $f$). Choose two distinct regular values $p,q \in S^2$. Then Gauss formula applied to $L_p$ and $L_q$ gives the integer invariant for $f$: $$\frac{1}{4 \pi} \int\!\!\int_{L_p \times L_q} \frac{\vec r_1 - \vec r_2}{|\vec r_1 - \vec r_2|^3} \cdot (d \vec r_1 \times d \vec r_2) $$