<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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