Added third pair to count_pairs, added count_shared_pairs to verify result