def count_lines(in_path):
    """Counts the number of lines of a file"""

    with open(in_path, 'r', encoding='utf-8') as in_file:
        i = 0
        for line in in_file:
            i += 1

    return i