Gracias ya logre hacerlo como me dijiste, al final el código quedo así.
Código PHP:
<?php
foreach ($rows as $rows) {
global $cont;
if ($cont % 4 == 0) {
?>
<tr></tr>
<?php
}
?>
<td><a href="vista_x_aula.php?codigo_aula=<?php echo $rows['CODIGO_AULAS']; ?>"><button type="button" class="btn btn-success"><?php echo $rows['DESCRIPCION']; ?></button></a></td>
<?php
$cont++;
}
?>