count the number of patients who until 4 years ago had been admitted to the hospital.
select count( distinct admissions.subject_id ) from admissions where datetime(admissions.admittime) <= datetime(current_time,'-4 year')