instruction: count the number of patients whose admission year is less than 2198 and drug route is im?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2198" AND prescriptions.route = "IM"