instruction: how many patients are admitted before the year 2145 and diagnosed with syncope and collapse?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2145" AND diagnoses.short_title = "Syncope and collapse"