Fixed usage of getNumberOfCollectionElements: replaced enclosing class with element class