def compare_pairs(one, two):
    """Compares two collections of contiguous group pairs.

    Gets common elements (i.e. intersection) between each list, and then
    finds the minimum number of occurrences of the elements in either,
    such that shared duplicate pairs will be included in the total.
    """
    total = 0
    for pair in set(one).intersection(two):
        total += min(one.count(pair), two.count(pair))
    return total