from pathlib import Path


def get_number_of_files_in_dir(directory):
    """
    Sums the number of files in a directory
    :param directory: Any directory with files
    :return: Number of files in directory
    """
    directory = Path(directory)
    files = directory.iterdir()
    total_files = sum(1 for x in files)
    return total_files