skylinegtr in future post, please list what you've been trying ;)
Now, based on this tutorial, and the category resource, I assume this code would work:
<h2>JOIN THE DISCUSSION</h2>
<#--Use the rest FreeMarker context object, passing the rest_version parameter and LiQL query (encoded by appending ?url) -->
<#assign categories = rest("2.0","/search?q=" + "SELECT id, title, topics.count(*), messages.count(*), views, view_href FROM categories ORDER BY topics.count(*) ASC"?url) />
<ul>
<#list categories.data.items as category >
<li><a href=“${category.view_href}”>${category.title}</a><br />
Topics count: ${category.topics.count} <br />
Messages count: ${category.messages.count} <br />
</li>
</#list>
</ul>
Disclaimer: I won't be responsible for any side effects of my code. Please test, test, and test on your stage environment first before pushing to production ...