Helper function updateMutationStats.