If the number of electrons is more, then the atom is negatively charged, becomes a -ve ion.
That is the case when n2> n1, also if the atom is deficient of electrons,
it is positively charged, becomes +ve ion. When n1>n2
Therefore the total charge on the body If there are n1 electrons and n2 protons will be |n1-n2|. Because whichever of the two will be lower in number, will be neautralized by the other and the left electrons/ protons will be the reason for the charge on the body