I’d like to control the styles for the container holding the flexible content layouts so I need to determine how many layouts the user has added. How can this be accomplished?
Got it! This just happens to be a nested flexible content field.
<?php if (get_row_layout() == 'flexibl_content_field') :
$layouts = get_sub_field('sub_flexible_content_field');
$layoutsCount = count($layouts);
?>
and use it like this in the while loop
<div class="col-md-6 <?php echo $layoutsCount == 3 ? 'col-lg-4' : 'col-lg-6'; ?>