instruction: how many times during their first hospital visit is patient 24762 getting a ptt test?
response: SELECT COUNT(*) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ptt') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24762 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)