instruction: bring me the number of patients with elective hospital admissions who were diagnosed with unspecified stomach ulcer.
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.short_title = "Stomach ulcer NOS"