the d subshellhas five orbitals, which can acoomodate a total of 10 electrons. has half filled orbitals which provide extra stability to it because of symmetrical configuration. Now Fe3+ has d5 configuration which suggests that it has a half filled d orbital which gives extra stability than Fe2+.
Keeping this in view, what is the electron configuration of Fe 3?
How many valence electrons does Fe 2+ have?
If you take iron, its atomic number is 26, which means that a neutral iron atom has 26 electrons. Orbital & bonding info: Iron's outermost shell is the n=4 shell, the 2 electrons that occupy it being located in the 4s subshell. These two electrons are iron's valence electrons.
How many of those electrons are unpaired Fe?
Now since we are given with Iron(II) we take out two electrons from the outermost orbit so as to give the iron a +2 charge. As evident from the configuration, in total there are 4 unpaired electrons. Using the same logic you can count the number of unpaired electrons for any ion.