"fundamentals of compiling"'s homework,
count the variable