We present a detailed study of the Ti 3$d$ carriers at the interface of LaAlO$_3$/SrTiO$_3$ heterostructures by high-resolution resonant inelastic soft x-ray scattering (RIXS), with special focus on the roles of overlayer thickness and oxygen vacancies. Our measurements show the existence of interfacial Ti 3$d$ electrons already below the critical thickness for conductivity and an increase of the total interface charge up to a LaAlO$_3$ overlayer thickness of 6 unit cells before it levels out. By comparing stoichiometric and oxygen deficient samples we observe strong Ti 3$d$ charge carrier doping by oxygen vacancies. The RIXS data combined with photoelectron spectroscopy and transport measurements indicate the simultaneous presence of localized and itinerant charge carriers. However, it is demonstrated that the relative amount of localized and itinerant Ti $3d$ electrons in the ground state cannot be deduced from the relative intensities of the Raman and fluorescence peaks in excitation energy dependent RIXS measurements, in contrast to previous interpretations. Rather, we attribute the observation of either the Raman or the fluorescence signal to the spatial extension of the intermediate state reached in the RIXS excitation process.