Modify count words for external use (commented out)