Question: how do you know how many electrons in each energy level?
Answer: The maximum number of electrons at a given energy level depends on its number of orbitals. There are at most two electrons per orbital. Electrons in the outermost energy level of an atom are called valence electrons. They determine many of the properties of an atom, including how reactive it is.