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$.