Store label_count in Context instead of a global variable.