The number of electrons in an atom is determined by its atomic number. The atomic number represents the number of protons in the nucleus of the atom, and in a neutral atom, the number of electrons is equal to the number of protons.
For example, the element hydrogen (H) has an atomic number of 1, which means it has 1 proton and 1 electron. Similarly, the element carbon (C) has an atomic number of 6, so it has 6 protons and 6 electrons.
In summary, to determine the number of electrons in an atom, you can simply look up the atomic number of the element on the periodic table.