how many times did patient 22517 visit hospital until 2 years ago?
select count( distinct admissions.hadm_id ) from admissions where admissions.subject_id = 22517 and datetime(admissions.admittime) <= datetime(current_time,'-2 year')