Its not a nice formula and the help columns are much better in this case, but i think the attach works
Code:
=COUNTIFS(DATA!$C:$C,'# Codes'!W$2,DATA!$B:$B,">="&DATE($AL$1,1,1-WEEKDAY(DATE($AL$1,1,1),2))+$V2*7,DATA!$B:$B,"<="&DATE($AL$1,1,1)-WEEKDAY(DATE($AL$1,1,1),2)+$V3*7-1)
Also i have unmerged AL1:AM1 - nothing good will ever come of merged cells and they should be avioded in my opinion