Monte Carlo simulation of the effect of counting losses on measured X-ray intensities