A counting X-ray detector includes, in a stacked array, a converter material for converting X-ray radiation into electric charges and an electrode. In an embodiment, the electrode is electrically conductively connected to the converter material. The electrode is designed to be at least partly transparent. In an embodiment, the electrode includes: an electrically conductive contact layer, an electrically conductive first intermediate layer, an electrically conductive high voltage layer, a second intermediate layer and an electrically conductive heating layer.