mojo3d:mojo3d.Entity.NumComponents
Gets the number of components of a given type attached to the entity.