Count files / directories / data in matched paths.

        Example:
            >>> import fs
            >>> fs.open_fs('~/projects').glob('**/*.py').count()
            Counts(files=18519, directories=0, data=206690458)

        Returns:
            `~Counts`: A named tuple containing results.

def count(self):
        # type: () -> Counts
        """Count files / directories / data in matched paths.

        Example:
            >>> import fs
            >>> fs.open_fs('~/projects').glob('**/*.py').count()
            Counts(files=18519, directories=0, data=206690458)

        Returns:
            `~Counts`: A named tuple containing results.

        """
        directories = 0
        files = 0
        data = 0
        for path, info in self._make_iter(namespaces=["details"]):
            if info.is_dir:
                directories += 1
            else:
                files += 1
            data += info.size
        return Counts(directories=directories, files=files, data=data)