Most of it should be doable via Frontend, but if you want to help a bit you can check the DataItemIndex
which basically returns a count for which row you are. Using modulo calculation you can check if it's a 4th item..
so add at the end of the transofrmation something like
{% if (DataItemIndex mod 4 == 0) {"</div>"} else {"<br />"} |(identity)GlobalAdministrator%}
or add a special class to each 5th row or what ever you need.