The number of electrons in an atom is equal to the atomic number of an element, for neutrally charged species. This means the number of electrons and the number of protons in an element are equal. Therefore, the number of electrons in oxygen is 8. Moreover, since these two subatomic particles, electrons and protons, have opposite charges, they cancel out and keep the atom neutral.