def overlap(set1, set2):
    """Computes the overlap between two sets.

    Args:
        set1,set2 (set or list): Input sets (or lists). Input lists are 
            converted to sets.

    Returns:
        overlap (int)
    """
    if not isinstance(set1, set):
        set1 = set(set1)
    if not isinstance(set2, set):
        set2 = set(set2)
    return len(set1.intersection(set2))
