if you do this
$layouts = get_field('field_name', false, false);
I think that $layouts should be an array. It’s length will tell you how many layouts there are and you can set up a counter to keep track of where you are and if you’re at the end. Having the list of layouts you can also look ahead in the array to see what the next layout is.