Try it in two passes.
Do your select query first, send that to a temp table.
SELECT PatientInfo.Antibioticregime, PatientInfo.AntibioticStartDate, PatientInfo.AntibioticFinishDate INTO TEMP_TABLE
FROM PatientInfo
WHERE....
Then count the values of the Antibioticregime. All the values will be...