XPS works with core electrons of atoms and the only shell that H and He have is the valence shell. Therefore all states that are due to the presence of H or He will be very close to the Fermi edge and that's the place where XPS has only very low cross sections.
If you use UPS which is more suitable for the Fermi-VB region you will of course receive signals that are due to the presence of H or He.
In the case of hydrogen, these will be a sigma bond orbital signal unless you happen to investigate ionic hydrides (or atomic hydrogen in the gas phase for the sake of completion). Therefore the approximations that are made in the equations for stoichiometry determination are no longer valid.
In the case of helium, you can of course get a UPS signal but unless you do special things (e.g. Article Photoelectron spectroscopy of laser-dressed atomic helium
If you need to get information from such light elements with high accuracy, ion-beam-analysis IBA techniques like Energy Recoil Detection (ERD) are recommended. You will not only identify the presence of such elements in your materials, but you also can quantify them with a good accuracy.
Secondary ion mass spectrometry (SIMS) is also another IBA technique which is known due to its very high sensitivity for detecting all elements even in ppm range. However, it is really complicated to use that for quantification, and standard samples and other parameters are needed.