2
@ line # 24
replace this:
<{if $category.count is div by 3}>
</tr><tr>
<{/if}>
with this:
</tr><tr>
That should work for the index page.
If you want to do the same thing with the sub-category pages you will need to replace the following text @ line 24:
<{if $subcat.count is div by 4}>
</tr><tr>
<{/if}>
with this:
</tr><tr>