You need to know or measure the Hall coefficient of your material, which is inversely proportional to the carrier density and from that you can calculate the carrier density for electrons or holes.
First you have to know which materials types like 1d 2d 3d , so that calculate the quantum cofinment of the electrons, and easy to measure the electron dinsity.