The impurity contributes to the density of states. Therefore, I would use the well-known expression n = F1/2(mu)R0. Where the carrier concentration is n, F1/2 is the Fermi integral, mu is the chemical potential of electrons, and R0 is the density of states at the point with coordinate x.