making name change from number_of_stars -> number_of_objects in pcat function, to be more general