refactored count caching; added counts for NumTopicAssignmentsToWordType