Performance of a digital CdTe X-ray spectrometer in low and high counting rate environment