def count_bidirectional(test_list):
    seen = set()
    count = 0

    for pair in test_list:
        if len(pair) != 2:
            continue

        a, b = pair
        reverse_pair = (b, a)

        if reverse_pair in seen:
            count += 1

        seen.add((a, b))

    return count