simplify the function to count CONSTANT names