<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nrefs(self, tag):
 """Determine the number of tags of a given type in a vgroup. Args:: tag tag type to look for in the vgroup Returns:: number of members identified by this tag type C library equivalent : Vnrefs """


        n = _C.Vnrefs(self._id, tag)
        _checkErr('nrefs', n, "bad arguments")
        return n