instruction: count the number of patients whose religion is episcopalian and item id is 51497?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "EPISCOPALIAN" AND lab.itemid = "51497"