langchain/document_loaders/blob_loaders/file_system.py/FileSystemBlobLoader/count_matching_files
class FileSystemBlobLoader:    def count_matching_files(self) -> int:
        """Count files that match the pattern without loading them."""
        # Carry out a full iteration to count the files without
        # materializing anything expensive in memory.
        num = 0
        for _ in self._yield_paths():
            num += 1
        return num