Add retry to migrate_word_counts