How to determine the number of radiation treatments a cancer patient gets?

Several factors. Type of cancer, location, and intent of treatment are all things that we take into account. Often, if the treatment is palliative in nature then a short course of treatment is used to give symptom relief quickly. If a patient is being treated for cure, the course of therapy might easily be 35-40 treatments depending on the type of cancer being treated.