A question on the nature of the vortex number In the Yang-Mills-Higgs (also called magnetic Ginzburg-Landau) model in the plane the energy has the form
$$
E(A,\phi)=\int_{\mathbb{R}^2}\left(|(d-iA)\phi|^2+\frac{1}{2}F_{jk}F_{jk}+\frac{1}{4}(1-|\phi|^2)^2\right)d^2x
$$
where $F_{jk}=\partial_jA_k-\partial_kA_j$, $\phi$ is a complex smooth function and $A$ is a real valued 1-form on $\mathbb{R}^2$. The $F_{jk}$'s are the components of $F=dA$ and is known that the number
$$
n=\frac{1}{2\pi}\int_{\mathbb{R}^2}F
$$
is an integer, under suitable hypotheses at infinity for $A$ and $\phi$. The proof of this fact can be found on Jaffe and Taubes' book  Vortices and Monopoles. Since I couldn't understand deeply the proof, I have several doubts and I want to make things clear. 
Taubes and Jaffe's hypotheses are 
$$
\lim_{R\to\infty}\sup_{|x|=R}|1-|\phi||=0
$$
and that exists $\delta>0$ such that
$$
|x|^{1+\delta}|D_A\phi|\leq \text{const}.
$$
Now suppose for a second to exaggerate and set both $A$ and $\phi$ compactly supported, for instance in a ball of radius $R$. The hypotheses should be fulfilled and by Stokes' theorem
$$
2\pi n=\int_{B_R}F=\int_{B_R}dA=\int_{\partial{B_R}}A=0.
$$
My question is how, relaxing slowly this hypothesis, the integral could "jump" from one integer to another, instead of changing continuously taking also all intermediate values? 
In the general case we should compute
$$
n=\lim_{R\to\infty}\frac{1}{2\pi}\int_{\partial B_R}A.
$$
I would like to understand what is the geometrical concept that hides and integer value in this integral. From Taubes and Jaffe's proof, this integral can indeed split in a part equal to some integer and a decaying part. Moreover, how can I see that this quantity is unchanged by (finite energy) perturbations of the fields?
Any hint or help is extremely appreciated.
 A: The Higgs field $\phi $ is (mostly) a red herring here. The vortex number can be equally understood in its absence and is determined by the boundary conditions on $A$, which you don't specify - they're the crucial ingredient. In particular, you cannot assume that $\int_{\partial B_R } A=0$. The thin vortex field $A=e_{\varphi } /r$ already given by Carlo Beenakker is an explicit example.
The physically relevant boundary condition is that $F=0$ at infinity. This is implemented by demanding that $A$ becomes a "pure gauge" at infinity, i.e., $A_{\mu } = iU\partial_{\mu } U^{\dagger } $ with unitary $U$.  This specification allows for a winding number - you can have $U=e^{in\varphi } $, but only with integer $n$, in order to be single-valued.
I somewhat disagree with Carlo Beenakker on one point (although this may be semantics) - the issue is not a failure of Stokes' theorem through a singularity in $A$, but confusion about the boundary conditions on $A$. It is not crucial for the vortex to be infinitely thin, i.e., $A$ to be singular at $r=0$ (and $F$ to be concentrated there). A thick vortex field $A=e_{\varphi } f(r)/r$ regular at $r=0$ with $f(r) \rightarrow 1$ for large $r$ equally satisfies the boundary conditions and leads to nontrivial winding number $n$. $n$ counts the number of these objects. If you have a collection of $n$ of these thick vortices, and you consider $\int_{\partial B_R } A$ for variable $R$, it will of course change continuously with increasing $R$ as you're enclosing more vortices, since $F$ is continuously distributed, until you reach asymptotic $R$, i.e., until all vortices are fully enclosed, $F=0$ outside $R$, and you reach the value $n$. If your vortices are thin, $\int_{\partial B_R } A$ will change discontinuously by integers, since then, $F$ is concentrated onto points in the $(r,\varphi )$ plane which you either do not enclose or enclose.
You can freely deform $f(r)$ above while respecting its boundary condition $f(r) \rightarrow 1$ for large $r$, and thereby change the distribution of $F$ at finite $r$ without changing $n$.
A: The vector potential $A$ is singular, so Stokes theorem does not imply $n=0$; in particular, for a single isolated vortex $\vec{A}=\hat{\varphi}/R$ in cylindrical coordinates, so $n=(2\pi)^{-1}\oint \vec{A}\cdot d\vec{l}=1$; for larger indices you would start from multiple widely separated vortices and then bring some of them together.
The integer-valuedness of $n$ is in general guaranteed by the requirement of a single-valued field $\phi(\mathbf{r})$, since $\phi\propto e^{in\varphi/2\pi}.$
