Counterspell macro

Anybody see any problems with a counterspell macro like the following.

/cast Counterspell
/script if GetNumRaidMembers() > 0; then c="raid"; elseif GetNumGroupMembers() > 0; then c="party"; else c="say"; m=UnitName("target"); s="Counterspelling "..m; SendChatMessage(s,c)

One of the things I would like to do is check the result of /cast so check it worked successfully but I can't actually see a way of doing this.