We need to count the number of linearly independent wavefunctions available to a particle. With the constraints that the region is finite and its energy is limited, this number of states is always a finite number.
Despite this, there are many different sets of linearly independent wavefunctions we can operate with. So choose the ones with definite energy values.
Kinetic energy depends on the square of the momentum. The wavefunctions must satisfy the boundary conditions, that is, in a 1 dimensional box, they must go to zero at both ends. So only certain wavelengths are permitted, with discrete values 2L, 2L/2, 2L/3....
$E_n$ = $h^2$$n^2$/8m$L^2$ where n is any positive integer.
Any other wavefunction can be written as a linear combination of definite energy wavefunctions. These definite energy wavefunctions are linearly independent.
So counting the number of definite energy wavefunctions is a way to count "all" the states in the box.
Inside a 3 D box, we multiply 3 1 dimensional definite energy wavefunctions to create a 3 Dimensional definite energy wavefunction.
$\psi$(x, y, z) = $\psi_x (x)$$\psi_y (y)$$\psi_z$(z)
These products aren't all the definite energy wavefunctions, but the others can be written as linear combinations of these.
If the box is a cube we have
E = $h^2$/8m$L^2$$[n^2$$_x$ + $n^2$$_y$ + $n^2$$_z$]
Most of the energy levels are degenerate, which corresponds to multiple linearly independent states that must be counted separately. The number of linearly independent states that have a given energy is known as the degeneracy of the level. That is, (n-fold) degeneracy.
You have a certain number of distinct position states, each of which can have a certain number of distinct momentum states associated with it, so the total number of distinct states is the product of the two.
So a molecule could be at position X = 5, with momentum P = 7, and so on. At least that's how I read it until I look up a few books. He then extends this idea to 3D.