Returns the number of memory zones supported by the target.

        Args:
          self (JLink): the ``JLink`` instance

        Returns:
          An integer count of the number of memory zones supported by the
          target.

        Raises:
          JLinkException: on error.

def num_memory_zones(self):
        """Returns the number of memory zones supported by the target.

        Args:
          self (JLink): the ``JLink`` instance

        Returns:
          An integer count of the number of memory zones supported by the
          target.

        Raises:
          JLinkException: on error.
        """
        count = self._dll.JLINK_GetMemZones(0, 0)
        if count < 0:
            raise errors.JLinkException(count)
        return count