Count the number of blank lines in the header

def count_header_blanks(lines, count):
    """
    Count the number of blank lines in the header
    """
    blanks = 0
    for i in range(2, count + 2):
        pair = _extract_header_value(lines[i])
        if not pair:
            blanks += 1
    return blanks