A k2 p2 rib is pretty stretchy so you probably want to make the hat about 2-3" smaller than his head. That would be measured without stretching it, so CO about 24 sts and work several inches in the rib and measure how many sts or ribs that makes. It's a good idea to stretch it fairly hard too and note how much larger that will make it compared to the unstretched measurement. Between having the stretched and unstretched numbers you should have a fairly good idea how many sts to cast on.
BTW, my head measures 23" as well, so that's not so hugely large, just on the larger side of 'normal'.
sue- knitting heretic