
    Write a function to determine how many times the heart rate readings from both the primary and backup cardiac monitors exactly match the expected baseline values for a patient at the same measurement intervals. The readings from all three sources (primary monitor, backup monitor, and baseline values) must be identical at the same time point to be counted as a match.
    

    
def count_samepair(list1, list2, list3):
    """
    Write a function to determine how many times the heart rate readings from both the primary and backup cardiac monitors exactly match the expected baseline values for a patient at the same measurement intervals. The readings from all three sources (primary monitor, backup monitor, and baseline values) must be identical at the same time point to be counted as a match.
    

    """
def count_samepair(list1, list2, list3):
    """
    Write a function to determine how many times the heart rate readings from both the primary and backup cardiac monitors exactly match the expected baseline values for a patient at the same measurement intervals. The readings from all three sources (primary monitor, backup monitor, and baseline values) must be identical at the same time point to be counted as a match.
    

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