instruction: How many of the patients with gangrene as their primary disease received drug via TD route?
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"