def count_files_dir(path):
    """count number of files recursivly in path."""
    # IN pathlib path
    num_f_dest = 0

    for f in path.glob("**/*"):
        if f.is_file():
            num_f_dest += 1

    return num_f_dest