I am trying to check if there are 0 images with the field name: carouselImages, then do not show the hide all including the parent.
<?php if($page->carouselImages()->count() > 1) echo>
<div class="carousel-inner">
<?php $n=0; foreach($page->carouselImages()->toFiles() as $image): $n++; ?>
<div class="item<?php if($n==1) echo ' active' ?>">
<img src="<?php echo $image->url() ?>"/>
</div>
<?php endforeach ?>
</div>