from pathlib import Path


def get_rel_path_len(data_root: str, fpath: str) -> int:
    """Determine the length of a relative path (depth in file system tree).

    Args:
        data_root
        fpath

    Returns:
        rel_path_len: integer
    """
    data_root_len = len(Path(data_root).parts)
    path_len = len(Path(fpath).parts)
    rel_path_len = path_len - data_root_len
    return rel_path_len