count how many medications patient 31260 has been prescribed in 08/last year.
select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 31260 ) and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') and strftime('%m',prescriptions.startdate) = '08'