update word counter for table