Total cross section measurements by X-ray detection of electron-capture residual activity