A counting X-ray detector for converting X-ray radiation into electrical signal pulses is disclosed. The counting X-ray detector includes, in a stacked arrangement, an illumination layer, a converter element and an evaluation unit. The illumination layer is designed to illuminate the converter element. The evaluation unit includes a measuring device for ascertaining an electrical direct current component in the converter element and a counting device for ascertaining from the signal pulses a number or an energy of events. A measuring electrode is formed on the converter element and an electrically conducting connection is formed between the measuring electrode and the measuring device.