Unwrap UVW NumberVertices() issue


is there a problem with .numberVertices() command ?
make an object apply unwrap modifier, break some faces then weld them together and run the script.

trying to select a vertices that is higher than max select all command will result in selecting an invisible vertex.

I appreciate if someone could guide me if i'm doing anything wrong thanks

	curSel = selection[1]
	curMod = modpanel.getcurrentobject()
	curindex = modpanel.getmodifierindex cursel curmod
--      numMapVerts = curSel.modifiers[curindex].numberVerticesByNode curSel ()
	numMapVerts = curSel.modifiers[curindex].unwrap.numberVertices()
	format "NumberVertices Command : %\n" numMapVerts
	max select all
	myArray = curSel.modifiers[curindex].getSelectedVertices() as array
	format "All Vertices Selected : %\n" myArray.count
	max select none