The surface integral of j over a surface S, followed by an integral over the time duration t1 to t2, gives the total amount of charge flowing through the surface in that time (t2 − t1):
$${\displaystyle q=\int _{t_{1}}^{t_{2}}\iint _{S}\mathbf {j} \cdot \mathbf {\hat {n}} \,{\rm {d}}A{\rm {d}}t.}{\displaystyle q=\int _{t_{1}}^{t_{2}}\iint _{S}\mathbf {j} \cdot \mathbf {\hat {n}} \,{\rm {d}}A{\rm {d}}t.}$$
I do not understand why this must be true, except if we are assuming this to be true. What I mean by that is, the continuity equation can be derived from Maxwell's equations. But let us say I do not have Maxwell's equations to use. That this equation must hold in the case of magnetostatics where there is no charge accumulation is not clear to me. Why? Because other than the heuristic explanation of how the flux of J through the surface is giving me charge going out of the surface, I have no real reason to believe this.
What is a rigorous proof that this equation is true?