# Total current for an arbitrary current density

Imagine a localized region $$\mathcal{R}$$ which contains a current density $$\mathbf{j}$$, which we take to be divergence-less, $$\mathbf{\nabla\cdot j} = 0$$. What is the total current associated with this current density?

If $$\mathcal{R}$$ has the topology of a torus, which is true for filamentary currents, we can calculate the flux of $$\mathbf{j}$$ over any cross section of the torus and find the total current as a surface integral $$I = \int_\limits \text{cross-section} \mathbf{j} \cdot d\mathbf{S}.$$ We see that the total current is a measure of a "total number of integral curves" of a transverse vector field $$\mathbf{j}$$.

My question: is it possible to generalize the notion of total current for an arbitrary current density localized to a region which doesn't have the topology of a torus? A simple example would be a rotating charged sphere.

I think that, mathematically, I am looking for a invariant of a localized, transverse vector field $$\mathbf{j}$$ which "counts" the number of distinct integral curves of such a field. So, answers from differential geometry are also welcome.