In smarty you will sometimes want to know if there are more than X amount of arrays within an array. Very useful for when you want to use collapse to show the first 5 and then hide the remaining 10 until a button is clicked.
This will display the array count value to the page
{$mydata|@count}
This will allow you to use the count value in an if statement
{if $myarray|@count gt 0}...{/if}
Then you can use the follow example
{foreach from=$reviews item=review name=review_loop}
{$review.title}
{if $smarty.foreach.review_loop.iteration eq 5 && $reviews|@count gt 5}
<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#see_more_reviews">See all Reviews</button>
<div id="see_more_reviews" class="collapse">
{/if}
{if $smarty.foreach.review_loop.last && $reviews|@count gt 5}
</div>
{/if}
{/foreach}