Refactoring reserved word counter.