How? The idea that not only mass is conserved but charge is conserved is a tenet of stoichiometry.
At its simplest level, stoichiometry embodies conservation of mass. If there are 10 g of reactant, at most there can be 10 g of product. But while mass is conserved in a chemical reaction; charge is also conserved. When we represent a redox reaction we use the addition/removal of electrons to represent reduction/oxidation respectively. Cross multiplication of the individual redox reactions shows how charge is conserved.