computes and outputs the number of scatterings and the status ID for each photon