For a neutral atom, the number of electrons equals the atomic number
For a positively charged ion, subtract the charge from the atomic number
For a negatively charged ion, add the charge to the atomic number
Use the periodic table to find the atomic number
For molecules, add the electrons from all atoms and adjust for the overall charge
For isotopes, the number of electrons stays the same as the atomic number if the atom is neutral
