Is there a way to simply count how many variables there are in a program?

I'm writing a thing and it has SOOOO many variables. I really don't want to go through and count them all, but I'm kind of curious as to how many I actually used. I suppose I could write a python program that would do it... but is there an easier way? I thought the find/replace function would give me a count of the instances it found but it doesn't.

Why do you want to count them?

It's not the end of the world if I can't... I'm just curious. So like, when I tell people about it I can say "oh, that program used over a hundred variables (or whatever it turns out to be) it was ridiculous!"

It is nothing to brag about having a lot of variables, often it is a sign of bad coding practice.

Use a word processor and change all int into int ( space ) and see how many it tells you it has changed. Do the same for the other variable types you have used.

What about variables used in libraries?

AWOL: What about variables used in libraries?

Yes but he has not defined them so there is no dubious bragging rights about that. :wink:

Oh I do agree; I suppose I could have made a few arrays instead, but that would have been a bit difficult to keep track of on my part... my program needs to store a lot of XYZ coordinates at once, so naturally there would be a lot of variables. The word processor trick sounds good to me, though; thanks!