fixed total_counts bug on merge()