The topological charge i.e. skyrmion number (also called wrapping number) is defined as the number of times the spin vectors in a 2D configuration (i.e. lying on a 2D plane, as shown in the image above, bottom 2) wrap around a unit sphere (as shown in the image above, top 2). The integration is performed over this 2D configuration/plane (far away, the spins are zero). For a magnetic skyrmion, this is an integer number of times.
The topological charge is defined as follows:
$$ Q = \frac{1}{4\pi} \int \vec{n} \cdot \left( \frac{\partial \vec{n}}{\partial x} \times \frac{\partial \vec{n}}{\partial y} \right) dxdy, $$
where $\vec{n}$ is the (normalized) spin vector. You can write the spin vector as follows:
$$ \vec{n} = \begin{pmatrix} \sin\theta \cos\phi \\ \sin\theta \sin\phi \\ \cos\theta \end{pmatrix} $$
If I understand correctly, this can be seen as a mapping from a two-dimensional space to the surface of a sphere $S^2$, but not sure how to precisely define this.
Any way, I am curious behind the intuition of this integral. Why exactly does this integral calculate the number of times the spins in a 2D configuration wrap a unit sphere?
I recognize the fact that there is a mixed product which essentially measures the volume of the parallelepiped by the three vectors, and the fact that this could be related to solid angle, but it is not clear to me exactly how this follows (both mathematically and visually).