A photon counting imaging detector for UV space missions