
    Write a function to determine how many daily heart rate measurements are identical across a patient's primary wearable device, secondary validation device, and historical baseline readings when compared at the same time points. The measurements from all three sources must match exactly at the same position to be counted, helping identify periods of consistent cardiac activity.
    

    
def count_samepair(list1, list2, list3):
    """
    Write a function to determine how many daily heart rate measurements are identical across a patient's primary wearable device, secondary validation device, and historical baseline readings when compared at the same time points. The measurements from all three sources must match exactly at the same position to be counted, helping identify periods of consistent cardiac activity.
    

    """
def count_samepair(list1, list2, list3):
    """
    Write a function to determine how many daily heart rate measurements are identical across a patient's primary wearable device, secondary validation device, and historical baseline readings when compared at the same time points. The measurements from all three sources must match exactly at the same position to be counted, helping identify periods of consistent cardiac activity.
    

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