<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def query_target_count(self, target):
 """Return the target count"""

    reply = NVCtrlQueryTargetCountReplyRequest(display=self.display,
                                               opcode=self.display.get_extension_major(extname),
                                               target_type=target.type())
    return int(reply._data.get('count'))