Single Pixel Photon Counting Detector