Simple command for counting number of types?

Blitz3D Forums/Blitz3D Beginners Area/Simple command for counting number of types?

Global TypeCount

Function Create_MyType()
   M.MyType = new MyType
   TypeCount = TypeCount + 1
End Function 

Function Delete_MyType(M.MyType)
   Delete M
   TypeCount = TypeCount - 1
End Function 


I'd do what perturbatio said(like the example above).