MQL4 Reference Global variables GlobalVariablesTotal
Print(GlobalVariablesTotal()," global variables detected");