Fermi Gas - Number of Free Electrons at High Temperatures

What I am trying to do is to compute the specific heat of a free electron gas in a conducting metal.

I am using Fermi-Dirac statistics as my framework to build off of. Importantly though, I want to understand what the specific heat does as a function of temperature, up to very high temperatures (millions of kelvin).

My governing equation is the definition of specific heat given in terms of the fermi-dirac distribution function $$f$$ and the density of states equation $$g$$

$$C_e(T_e)=\int_{-\infty}^\infty \frac{\partial f(\varepsilon,\mu,T_e)}{\partial T_e}g(\varepsilon)\varepsilon\ d\varepsilon,$$

The first consideration that I make is that the fermi level is a function of temperature, so I use the following conservation equation to solve for the fermi level $$N_e=\int_{-\infty}^\infty f(\varepsilon,\mu(T_e),T_e)g(\varepsilon)d\varepsilon.$$

where $$N_e$$ is the number of free electrons. For example in Copper it would be 1 electron/atom.

My question is around how to determine the number of free electrons in a metal as a function of temperature. All the analysis that I have seen just assumes a static amount of free electrons for a material, but we know as $$T\to\infty$$ the number of free electrons goes towards the atomic number of the metal.

My question is how can I solve for $$N_e(T)$$ if I know $$N_e(T_0)$$?

Could I use the same fermi-dirac distribution except this time set my electron density to be all of the electrons in the media, and solve for an energy level in which the high energy tail of the distribution at room temp equals the known number of free electrons. I could then watch how the population of electrons above and below that energy level evolve as a function of $$T$$?

Any guidance would be greatly appreciated.