bugfix in container_count()