There are 3 types of sub shell, S, P, D and F. In the S sub shell, there can be a maximum of 2 electrons, in P there are 6 electrons maximum, in D there are 10 electrons maximum, and F there are 14.
Main shell 1 only has an s sub shell, shell 2 has s&p, shell 3 has s,p&d and after that they have all four.