add frequency counting to tagging