Query regarding statements on Maxwell Boltzmann probability 
(From Modern Physics, by Serway and Moses) 
I don't quite understand how the final expression that n=gf came to be. How is degeneracy related to number of particles in that state? I imagined n=fN would be right, where N is the total number or particles, so I'm not sure why degeneracy is in the picture.

Also, how is f(v) dv proportional to volume of shell between v and v+dv? How did this come to be? 
 A: First of all, equation (10.4) is wrong if you ask me. After all, $f_{MB}$ is a probability and can therefore not be larger than one, and the degeneracy is not related to the number of particles, and could technically be $g_i=1$ for a hypothetical state. But then this state could never be occupied by more than 1 particle according to that formula, which is not correct.
Actually, $n_i$ should be a fraction of the number of particles in state i and the total number of particles. This is the correct formula for the Maxwell-Boltzmann distribution:
$$
\frac{n_i}{N} = \frac{g_i}{Z} e^{-E_i/k_BT} \,,
$$
where
$$
Z(T) = \sum_i g_i e^{-E_i/kT}
$$
is the partition function of the energy states. Then $A$ from equation (10.3) is $A=1/Z(T)$. The partition function is a temperature-dependent normalization factor that is necessary because the statistical derivation of the Maxwell-Boltzmann distribution dictates that the probability of finding a particle in state $i$ must be proportional to the exponential term $e^{-E_i/k_BT}$, but we also have the condition that the probability of finding the particle in any state must be equal to one.
To take a simpler example: the probability of rolling a five on a six-sided die is proportional to 1, but the actual probability needs to be divided by the sum of all possible probabilities, in this case six possible sides of the die. So the partition function is $Z=6$ and the actual probability of rolling a five is $p=1/6$.
Now the degeneracy is just a number that counts the states at the same energy level. You need to count those correctly for obtaining the correct solution. For the die roll the analogy would be: what if there were multiple 5's on the die, for example to sides of the die have the number 5 written on them? In order to get the probability of rolling a five, you need to calculate the probability of rolling a specific number ($p=1/6$) and then multiply it by the number of times the 5 appears on the dice, so $2*1/6=1/3$. The degeneracy of the number five would be 2 here.
As for your second question: That is simply the definition of the number of states. Each vector $(v'_x, v'_y, v'_z)$ is a velocity state, and to find the number of velocity states with $|v| \leq |v'| \leq |v+dv|$ you have to integrate over the volume between the two spheres with radii $|v|$ and $|v+dv|$.
However, there are two implicit assumptions here, which are that the density of velocity states is 1) uniform and 2) continuous. This is the case since we are simply talking about classical velocities and there is no reason why some velocities should not be allowed or why the velocities should be discrete.
