Forum:Popular categories

Hello, I'm looking for a way to automatically create a list of popular categories (maybe in a given category), exactly like Special:Mostpopularcategories. I though of doing it with DPL, but I can't find an order method based on the peges in a category. Any ideas?