The number electrons can change in an atom. Ions are charged particles. Atoms become ions by gaining or losing electrons. A cation is a positively charged ion due to the loss of electrons. The charge of a cation is the same value as the number of electrons lost. So if three electrons are lost, the cation would have positive 3 charge. Anions are negatively charged ions due to the gaining of electrons. Similarly, the charge of an anion is the same value as the number of electrons gained. So if three electrons are gained, the anion would have negative 3 charge. Since ions of different elements can have the same charge and number of electrons, it is not possible to determine the type of atom by simply knowing its charge or the number of electrons the atom has at any given moment.
The number of protons is what is used to identify elements. The number of protons, or atomic number, can never change. For this reason, the periodic table is arranged left to right by the atomic numbers of the elements.