def compute_num_recordings(recording_pattern):
    """Calculates the total number of recordings for a recording pattern."""
    total_num_recordings = recording_pattern[0, 1] // recording_pattern[0, 0]  # +1 for init recording
    for i in range(1, recording_pattern.shape[0]):
        total_num_recordings += (recording_pattern[i, 1] - recording_pattern[i - 1, 1]) // \
                                recording_pattern[i, 0]
    return total_num_recordings