import re


def row_skipper(file):
    """
    Count how many rows are needed to be skipped in the parsed codebook.

    Parameters:
        file (character): File name of the parsed codebook

    Returns:
        count: The number of lines to be skipped
    """
    with open(file, 'r') as codebook:
        count = 0
        for line in codebook:
            count += 1
            if re.search('(NAME)[\t]+(SIZE)[\t]+(DESCRIPTION)[\t]+(LOCATION)', line):
                count -= 1
                break
    return count