Flexible Content get by index code example
Example 1: have_rows count acf php
$numrows = count( get_field( 'field_name', 'post_id' ) );
// post_id isn't need but required in some situations
Example 2: acf get row index
echo get_row_index();
$numrows = count( get_field( 'field_name', 'post_id' ) );
// post_id isn't need but required in some situations
echo get_row_index();