def compare(combo: list, attempt: list) -> int:
    """Compare items in two lists and count number of matches.

    Compare each tumbler in **combo** with **attempt** and return
    the number of matches.

    Args:
        combo (list): Integers of safe combination.
        attempt (list): Integers of guessed safe combination.

    Returns:
        Number of tumbler matches between **combo** and **attempt**.

    """
    return sum(1 for i, j in zip(combo, attempt) if i == j)