The number of items of visible communities in the profile isn’t exceed 5, but the number of items for hidden communities isn’t limited (actually is limited by SE sites count):
My suggestion is to limit the visible items of hidden communities in the profile in the same way as for unhidden communities. This will at least prevent the large empty area on the right column of the page, i.e. page vertical space will be used more evenly.