Not exactly sure what you’re trying to do to be honest.
get_row_index() will only give you the current index, not the number of rows. This is good if you want to alter something based on the current row, but not if you are trying to change something based on the number of rows.
if you want to get the number of rows
$rows = count(get_field('row_content_boxes'));
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users