counts and displays # of instances for each object