count global variables