count up for XES and RIXS plotting