instruction: count the number of patients with procedure icd9 code 17 who were admitted before 2145.
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2145" AND procedures.icd9_code = "17"