def lines_in_file(filename: str) -> int:
    """
    Count the number of lines in a file

    :param filename: A string containing the relative or absolute path to a file
    :returns: The number of lines in the file
    """
    with open(filename, "r") as f:
        return len(f.readlines())