instruction: what is the number of patients whose primary disease is gangrene and drug route is td?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "GANGRENE" AND prescriptions.route = "TD"