instruction: How many of the patients admitted before the year 2173 were diagnosed with ac salpingo-oophoritis?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2173" AND diagnoses.short_title = "Ac salpingo-oophoritis"