Question: what is the formula to find the number of electrons?
Answer: Multiply the element's atomic number by the number of atoms of this type (see Step 1) in the molecule. Repeat for all elements in the molecule, then add up all the products to calculate the number of electrons. In the first example, the number of electrons in KNO3 equals (19 x 1) + (7 x 1) + (8 x 3) = 50.