Collect number of phtons using Sensitive detector

i need to get X-ray spectrum , can anyone help me