DOS confusion

We have the rate of change of number of electrons with energy directly proportional to the volume in an 3-D potential well.
For a white dwarf, the mass is inversely proportional to its volume.

If we consider the electrons in a white dwarf to be in such a potential well, dN/dE becomes inversely proportional to the mass of the white dwarf which,to me, is hard to digest because with more mass the number of electrons is supposed to increase.

g(E)=kE^(0.5)
g(E) is the density of states, k a constant and E the energy of the state.
dN/dE =kVE^(0.5)
dN/dE is the rate of change of number of electrons with energy.
For a white dwarf,
R=(3.6*10^19)/M^(1/3)
where R is the radius and M the mass of the wd.
Since its volume is in inverse proportion to its mass, dN/dE becomes inversely related to the latter.But dN/dE is supposed to be directly proportional to its mass so that integration over all the energy levels gives more free electrons.

I got it.The temperature inside of a white dwarf is about 10^7K, at such temperatures, the distribution function given by
f(E)= [exp(E-Ef)/kT +1]^-1 is approximately 1 for all states, so integration of f(E)g(E)dE gives more electrons per unit volume.
As the volume of the white dwarf lowers, its mass rises, temperature rises bringing f(E) closer to 1.
That doesn't seem correct either.What after the white dwarf has cooled ?