We present a study of charge transfer in Na-intercalated FeOCl and polyaniline-intercalated FeOCl using high-resolution x-ray absorption spectroscopy and resonant x-ray emission spectroscopy at the Fe K edge. By comparing the experimental data with ab initio simulations, we are able to unambiguously distinguish the spectral changes which appear due to intercalation into those of electronic origin and those of structural origin. For both systems, we find that about 25% of the Fe sites are reduced to Fe(2+) via charge transfer between FeOCl and the intercalate. This is about twice as large as the Fe(2+) fraction reported in studies using Mossbauer spectroscopy. This discrepancy is ascribed to the fact that the charge transfer occurs on the same time scale as the Mossbauer effect itself. Our result suggests that every intercalated atom or molecule is involved in the charge-transfer process, thus making this process a prerequisite for intercalation. The Fe(2+) fraction is found to increase with pressure for polyaniline-FeOCl, hinting at an enhancement of the conductivity in the FeOCl intercalation compounds under pressure.