XF 1.2 Display Ad in last post if posts are more than x?


Well-known member
I am attempting to find the conditional to display an ad in the last post of a thread, but only if the thread has more than say 5 posts. Can anyone help with this?