How many electrons can an orbital hold? I know the answer is 2, but how do you get there?

And how do you figure out how many 2p orbitals there are in an atom?

Electrons are paired in an orbital. One electron is +1/2 and the other electron is -1/2. There are only two ways that the electron can spin.

The TOTAL number of p orbitals depends upon how many principle levels you have ; i.e., if n = 1, 2, 3, or what have you. For any n level, there are three p orbitals, each mutually perpendicular to each other in space. There is 1 s orbital, 3 p, 5 d, and 7 f. Each can hold two electrons; therefore, there may be 2 s electrons, 6 p electrons, 10 d electrons, or 14 f electrons. It may help if you look at a diagram but we can't draw diagrams on this board.