It's pretty simple to loop through the page sizes using JavaScript; here's a chunk of example code you can run from the console. Add more pages sizes as required, remember Acrobat measures everything in Points (72 pt per inch):
console.println("There are " + this.numPages + " pages in this document");
// counters
var numA3 = 0;
var numA4 = 0;
var numUSL = 0; // etc.
// helper function to compare a number with some wiggle room - we look for portrait and landscape possibilities
function inRange(wid,hei,targetWid,targetHei) {
var wiggle = 2; // amount of error to allow in Points. Not all PDF software creates perfectly-sized pages
return (wid>=(targetWid-wiggle) && wid<=(targetWid+wiggle)) && (hei>=(targetHei-wiggle) && hei<=(targetHei+wiggle)) || (hei>=(targetWid-wiggle) && hei<=(targetWid+wiggle)) && (wid>=(targetHei-wiggle) && wid<=(targetHei+wiggle))
}
for (pagenum=0;pagenum<this.numPages;pagenum++) {
var pbox = this.getPageBox("Crop",pagenum);
var width = (pbox[2] - pbox[0]);
var height = (pbox[1] - pbox[3]);
var recognized = false;
if (inRange(width,height,841,1188)) { numA3++; recognized = true; }
if (inRange(width,height,595,841)) { numA4++; recognized = true; }
if (inRange(width,height,594,792)) { numUSL++; recognized = true; }
// etc...
if (!recognized) console.println("Page " + (pagenum+1) + " has a width of " + (width/72) + " and a height of " + (height/72) + "inches");
}
console.println(numA3 + " A3 pages");
console.println(numA4 + " A4 pages");
console.println(numUSL + " US Letter pages");
console.println((this.numPages++ - (numA3+numA4+numUSL)) + " other pages");