Add tests for counting after merging