Thanks a lot, I’ve already did it this way, and it works
<div class="row">
<?php if(have_rows('table_forms')): ?>
<?php $numrows = count( get_field( 'table_forms' ) ); ?>
<?php while ( have_rows('table_forms') ) : the_row(); ?>
<?php if($numrows <3) {$counttables = 6;} else {$counttables = 4;} ?>
<div class="col-md-<?php echo $counttables; ?>">
<div class="main-table">
<h3><?php the_sub_field('table_forms_name'); ?></h3>
<table class="table main-table-slyle">
<tbody>
<tr>
<td class="main-table-td"><h3>Длительность</h3></td>
<td><?php the_sub_field('table_forms_dlit'); ?></td>
</tr>
<tr>
<td class="main-table-td"><h3>Количество часов</h3></td>
<td><?php the_sub_field('table_forms_kol'); ?></td>
</tr>
<tr>
<td class="main-table-td"><h3>Уровень</h3></td>
<td>
<?php the_sub_field('table_forms_urov'); ?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<?php endwhile;?>
<?php
else :
// no rows found
endif;
?>
</div>