how many times is the bupivacaine until 1 year ago prescribed to patient 90165?
select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 90165 ) and prescriptions.drug = 'bupivacaine' and datetime(prescriptions.startdate) <= datetime(current_time,'-1 year')