Answer: 6 electrons
Explanation: Oxygen atom has atomic no of 8 which means it has got 8 electrons. n=2 depicts that the electrons have principle quantum no = 2. According to Afbau's rule the electrons are arranged in shells of increasing energy as follows:

Thus there are 2 electrons in 2s and 4 electrons in 2p which makes a total of 6 electrons.