that aside, this kind of macro is big trouble for specific reasons:
A(b); //multiple attempts to declare count in same scope generates confusing error msg
and the above error is exceedingly annoying to fix if you had a lot of code between the calls or worse, called it in a loop where the problem becomes masked.
I am not sure your template is correct either, but not 100% sure right this moment.
Macros like this cause all kinds of trouble. They give weird, unpredictable error messages that take a lot of time to work through, have type safety problems, and once working they can confuse debuggers and tools about where the actual problem really is. They are a lot like goto -- the language supports it, but its not really the best way to do most tasks.