def file_line_number(path: str) -> int:
    """

    Parameters
    ----------
    path
        The path to calculate the number of lines in a file.

    Returns
    -------
    ret
        The number of lines
    """
    ret = 0
    with open(path, 'rb') as f:
        for _ in f:
            ret += 1
        return ret