eventCount = 0 for j in 1 to $.baseobject.numsubs do ( if iskindof (getsubanim $.baseobject j) tyEvent then (eventCount += 1) ) print eventCount