/cast Water Shield
/run i="Water Shield" if ws==nil then ws=0 end t=GetSpellCooldown(i) if t==b then else c=0 end b=GetSpellCooldown(i) if b==t and c==0 then ws=ws+1 c=1 end
Which will both cast Water Shield for you (obviously, you'll have to change the name if you want to count casts of a different spell), and then use:
To kick the count out to the Say chat channel. Naysayers among you may say "well that's pointless," and they're kind of right -- it doesn't really matter how many times you cast something, and the macro doesn't do anything else for you besides update a variable to keep track of that number.
But it is interesting to see just how many times, say, you pressed the Fireball button during the raid last night, and maybe there is some use for this information somewhere (maybe checking the frequency of use or viability of certain spells or trinkets?). Might be a good macro to have when you want to know more about what you're casting.