Change to get_NumberOfScans funciton