I have a category template and each page can be associated with multiple categories using a page field type.
i have this in php : -
$categories = $pages->find("template=category, limit=6");
I want to sort the results by the amount of pages each category has, is there a way to do this in a selector or is there a better way of doing this?