I looked through Wowwiki's page on macro's and wasn't able to see anything that would be able to add a range modifier like you want.
What I would suggest is to get good at gauging the distance and then just have a normal macro with a shift modifier so you can decide what do do.
I would personally suggest
#showtooltip Counterspell
/stopcasting
/cast Counterspell
/cast arcane torrent [modifier:shift]
I am pretty sure that will work and hope that helps.