Well, either that Chemistry teacher is on something, or perhaps you misheard. The number that determines what element an atom is is it’s proton count. Electrons can and do change—more electrons make an atom negatively charged, fewer make it positively charged. To clarify—proton count is the only thing that doesn’t change. (Different proton count means different elements.) Different number of neutrons = isotope, different number of electrons = ion.