calculate the number of patients staying in ward 7.
select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.wardid = 7 )