I have personally also contemplated this issue, and have come up with a simple solution that is satisfactory, to me at least. I'm sure this can also be found in many textbooks. In general, we have

$$\tag{$\star$} Q=\int \rho\ d\tau$$

because we are considering a three dimensional space. Intuitively, we feel it should be possible to talk about a three dimensional charge distribution in every case. The question is how to conceptualize this when discussing surface, line or point charges. The solution comes in the form of the Dirac delta distribution (or function, depending who you ask).

Let's take a look at an example: Consider a 2-sphere of radius $R$, with some charge distribution $\sigma(\theta,\phi)$ on it. What is the three dimensional charge distribution $\rho(r,\theta,\phi)$ corresponding to this situation? Like I said, we have to use the Dirac delta:

$$\rho(r,\theta,\phi)=\delta(r-R)\sigma(\theta,\phi)$$

Now, $(\star)$ gives us:
$$ Q=\int\rho\ d\tau=\int_{0}^{2\pi}\int_{0}^\pi\int_0^\infty \rho\ r^2\sin\theta\ dr\ d\theta\ d\phi=R^2\int_{0}^{2\pi}\int_{0}^\pi\sigma\ \sin\theta\ d\theta\ d\phi$$

Similarly, when considering a line or point charge, one uses two or three Dirac delta's to describe the distribution in 3-space.

The complex notations$^1$
$$\int_{\mathbb{C}}\!\mathrm{d}z^{\ast}~\mathrm{d}z, \tag{1}$$
$$\int_{\mathbb{C}}\!\mathrm{d}^2z, \tag{2}$$
and similar notations, mean a real double integration $$N\iint_{\mathbb{R^2}} \!\mathrm{d}x~\mathrm{d}y\tag{3}$$
in the complex plane $\mathbb{C}\cong \mathbb{R}^2$ with coordinates $z=x+iy$, where $N$ is a conventional normalization factor that depends on the author.

*$N=1$ convention:*

- A. Altland & B. Simons,
*Condensed matter field theory,* 2nd ed., 2010. See e.g. sentence above eq. (3.11).

*$N=2$ convention:*

J. Polchinski, *String Theory,* Vol. 1, 1998. See e.g. eq. (2.1.7).

R. Blumenhagen, D. Lust & S. Theisen, *Basic Concepts of String Theory,* 2012. See e.g. footnote on p. 85.

*$N=2i$ convention:*

- J.H. Negele & H. Orland,
*Quantum Many-Particle Systems,* 1998. See e.g. eq. (1.124).

--

$^1$ Note that $z^{\ast}=x-iy$ denotes the complex conjugate variable. It is *not* an independent complex variable. In particular, the integration (1) is over $\mathbb{C}$. It is *not* over $\mathbb{C}^2$. See also e.g. this Math.SE post, this Phys.SE post and links therein.

## Best Answer

If your main motive is to show that, in magnetostatics, $$\int\limits_{V}\mathbf{J}\, d\tau =0 $$ Then there is actually quite a simple way to achieve that, using the fact that, in magnetostatics, $$\frac{\partial\rho}{\partial t}=0 $$ We start with the relation, $$\int\limits_{V}\mathbf{J}\, d\tau =\frac{d\mathbf{p}}{dt} $$ Where, $\mathbf{p} $ is the electric dipole. Also we know that, $$\mathbf{p}=\int\limits_{V}\rho\mathbf{r}\, d\tau $$ Therefore, $$\frac{d\mathbf{p}}{dt}=\int\limits_{V}\frac{\partial\rho}{\partial t}\mathbf{r}\, d\tau=0 $$ Which makes, $$\int\limits_{V}\mathbf{J}\, d\tau =0 $$