Coupling an electric charge to a gauge field. How is it done in this setup? In page 9 of Tachikawa's N=2 susy dynamics for pedestrians it says that an electric particle with charge $n$ in the first quantised setup (in what sense first quantised?), Wick rotated to Euclidean signature, couples to a gauge field via 
$$ S = i n \int_L dx^{\mu} A_{\mu} = in \int_L A. $$
where $L$ is the worldline of the particle. Now, why is this true? Can some further justification be given.
Also, in the following step he uses Maxwell's action and the equation I just wrote above and adds them together, and uses the EOM for $A_{\mu}$ to derive the fact that $n$ must be an integer. Specifically he writes
$$ \int_{S^2} \frac{4\pi}{e^2} \vec{E} \cdot d\vec{n} = \int_{S^2}\frac{4\pi}{e^2} \star F = 2\pi n $$
Where does the $S^2$ come from and where does more generally the above equation come from? I cannot understand how he gets it.
 A: The "first-quantized setup" is the setup of quantum mechanics, where single particles are considered quantum objects, but fields like the electromagnetic field are still treated classically. However, the derivation of the action in the following is wholly classical (and the first-quantized setup arises when considering $x^\mu$ as quantum fields in the sense of QM as a 0+1 dimensional QFT).
A particle with charge $n$ couples to the gauge field by $n\int_L A$ along its worldline because gauge fields, as a general principle, couple minimally to their four-current $j^\mu$ by $\int j_\mu A^\mu$. The four-current is simply the charge of the particle flowing along the worldline $x^\mu(\tau)$ of the particle, i.e. $j^\mu(y) = n \frac{\partial x^\mu}{\partial \tau}\int \delta(x(\tau) - y)\mathrm{d}\tau$. Inserting this into $\int j^\mu A_\mu$ gives
$$ \int j^\mu(y)A_\mu(y)\mathrm{d}^4 y  = \int \left(n \frac{\partial x^\mu}{\partial \tau}\int \delta(x(\tau) - y)\mathrm{d}\tau\right)A_\mu(y)\mathrm{d}y$$
and carrying out the $y$-integration yields
$$ \int n \frac{\partial x^\mu}{\partial\tau}(\tau)A_\mu(x(\tau))\mathrm{d}\tau$$
and the chain rule yields the claimed expression
$$ \int n A_\mu \mathrm{d}x^\mu$$
For your second question, the "sphere at infinity" $S^2$ appears from considering Stokes' theorem
$$ \int_\Sigma \mathrm{d}\omega = \int_{\partial\Sigma}\omega$$
and formally writing $\partial\mathbb{R}^n = S^n$. A better consideration would be restricting the integral to a ball of radius R in $\mathbb{R}^n$ and then letting $R$ tend to infinity.
