This is given on pg 88 1st Para.
"We can Explain the number of elements in these periods based on how electrons are filled into various shells.recall that the maximum no. of electrons that can be accommodated in a shell depends on the formula 2n^2 where 'n' is the number of the given shell from the nucleus
For Eg.
K shell = 2 X (1)^2 = 2 ,hence the first period has 2 elements.
L shell= 2 X (2)^2 = 8 , hence the second period has 8 elements
M shell"= 2 X (3)^2 = 18 but the outermost shell can have only 8 electrons , so the third period has only 8 elements "
Don't you find this wrong??????? but it''s given in ncert..