With the pressure range accessible to laser driven compression experiments on solid material rising rapidly, new challenges in the diagnosis of samples in harsh laser environments are emerging. When driving to TPa pressures (conditions highly relevant to planetary interiors), traditional x-ray diffraction techniques are plagued by increased sources of background and noise, as well as a potential reduction in signal. In this paper we present a new diffraction diagnostic designed to record x-ray diffraction in low signal-to-noise environments. By utilising single photon counting techniques we demonstrate the ability to record diffraction patterns on nanosecond timescales, and subsequently separate, photon-by-photon, signal from background. In doing this, we mitigate many of the issues surrounding the use of high intensity lasers to drive samples to extremes of pressure, allowing for structural information to be obtained in a regime which is currently largely unexplored.