instruction: how many patients whose days of hospital stay is greater than 27 and diagnoses icd9 code is e8786?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "27" AND diagnoses.icd9_code = "E8786"