count the number of times patient 2489 has ever been prescribed a levofloxacin on their last hospital visit.
select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 2489 and admissions.dischtime is not null order by admissions.admittime desc limit 1 ) and prescriptions.drug = 'levofloxacin'