In an X-ray scanning apparatus including a photon counting type X-ray detection element, in order to perform counted number correction specialized for pile-up with high accuracy, the X-ray scanning apparatus includes an X-ray detector in which a plurality of photon counting type X-ray detection elements are disposed, each of the X-ray detection elements detecting an incident X-ray photon, classifying energy of the X-ray photon into two or more energy ranges, and counting the X-ray photon, and a correction unit that corrects the counted number in the X-ray detection element, in which the correction unit includes a counting error amount determination part that determines a counting error amount in a counted number due to pile-up according to a pile-up occurrence probability in two or more X-ray photons.