from pathlib import Path
import logging


def count_missing_patterns(dir_path: Path, file_patterns: list) -> int:
    """
    Used to count file patterns MISSING FROM a path.
    :param dir_path: The path to check.
    :param file_patterns: The file patterns to look for.
    :return: Count of missing patterns.
    """
    count = 0
    for pattern in file_patterns:
        if len(list(dir_path.glob(pattern))) == 0:
            logging.warning(f"Missing items in pattern {pattern}!")
            count += 1
    return count