Use gstate.getNumBoneWeights()