Thread:Extension talk:DynamicPageList (Wikimedia)/Can I count the pages with a templates/reply

I don't think it's possible to do it with the Wikimedia version of DPL, but Extension:DynamicPageList (third-party) does have the capabilities you seek. There's even a random seed function for random output.