The conducting interface of LaAlO3/SrTiO3 heterostructures has been studied by hard x-ray photoelectron spectroscopy. From the Ti 2p signal and its angle dependence we derive that the thickness of the electron gas is much smaller than the probing depth of 4 nm and that the carrier densities vary with increasing number of LaAlO3 overlayers. Our results point to an electronic reconstruction in the LaAlO3 overlayer as the driving mechanism for the conducting interface and corroborate the recent interpretation of the superconducting ground state as being of the Berezinskii-Kosterlitz-Thouless type.