The number of valence shell electrons = the group number.
The number of electrons in the outer shell of Beryllium is 2.
2,8,18,32,50
A maximum of 18; 2 in the s subshell, 6 in the p subshell, and 10 in the d subshell.
21 s2 s2 p