Hi,

I would like to count the number of global variables defined and input it in another global variable. Anyone can help?

Code:
sysuse auto, clear

global M1 "make"
global M2 "Price"
global M3 "mpg rep78"
*
*
global M75 "make price rep78"

*** How to count the number of "M", in this case 75, and input it in a global variable "M_count"?
global M_count