WIP: Adding count_3way_mergeable.py script.

This revision is still buggy, don't use it.