Return the number of dependencies of this module to the given node.

        Args:
            to (Package/Module): the target node.

        Returns:
            int: number of dependencies.

def cardinal(self, to):
        """
        Return the number of dependencies of this module to the given node.

        Args:
            to (Package/Module): the target node.

        Returns:
            int: number of dependencies.
        """
        return sum(1 for _ in filter(
            lambda d: not d.external and d.target in to, self.dependencies))