
    In a hospital's cardiac monitoring system, develop a function that identifies how many times all three independent heart rate monitoring devices (primary, secondary, and backup) recorded exactly the same value at the same time point during patient observation. This cross-validation is crucial for ensuring accurate vital sign monitoring and early detection of potential equipment malfunction or patient deterioration.
    

    
def count_samepair(list1, list2, list3):
    """
    In a hospital's cardiac monitoring system, develop a function that identifies how many times all three independent heart rate monitoring devices (primary, secondary, and backup) recorded exactly the same value at the same time point during patient observation. This cross-validation is crucial for ensuring accurate vital sign monitoring and early detection of potential equipment malfunction or patient deterioration.
    

    """
def count_samepair(list1, list2, list3):
    """
    In a hospital's cardiac monitoring system, develop a function that identifies how many times all three independent heart rate monitoring devices (primary, secondary, and backup) recorded exactly the same value at the same time point during patient observation. This cross-validation is crucial for ensuring accurate vital sign monitoring and early detection of potential equipment malfunction or patient deterioration.
    

    """
    result = sum((m == n == o for (m, n, o) in zip(list1, list2, list3)))
    return result