Final answer:
To find the number of electrons in an atom, check the atomic number on the periodic table which equals the number of electrons for a neutral atom. Adjust based on the atom's charge for ions, and look at the group number or electron configuration to find valence electrons.
Step-by-step explanation:
To figure out the number of electrons in an atom, use the periodic table to find the atomic number of the element, which represents the number of protons. In a neutral atom, the number of electrons equals the number of protons. For example, an oxygen atom has 8 protons and, when neutral, also has 8 electrons; hydrogen has 1 proton and 1 electron.
In cases where the atom has a charge, the number of electrons is equal to the number of protons minus the charge on the atom. For example, a sodium ion (Na+) which has lost an electron will have one less electron than its atomic number of 11, giving it 10 electrons.
To determine the valence electrons of an atom in a compound or ion, look at the element's group number on the periodic table for main-group elements or determine the electron configuration. For ions, adjust the total number of electrons according to the charge by adding electrons for a negative charge or subtracting for a positive charge. The total number of valence electrons in CO32-, for instance, would include an additional two electrons due to its -2 charge.