def _extract_dir_data(path):
    """

    Expects the directory to be named like: "tmp_<run>_with_<images in run>"

    Args:
        path: Path of the directory.

    Returns:
        The run index and image count per run.
    """

    split = path.stem.split("_")
    run = int(split[1])
    count_per_run = int(split[3])

    return run, count_per_run