Sounds like you did it right, but because hats stretch, especially with ribbing, you need to make it a couple inches less than the actual head measurement. So your CO should be 80. As for the right size needle, as long as you measured your sts/inch accurately, then multiply by the size, it works. The trick is making a large enough sample to see how many sts/inch you get. You might actually be getting 3½ or 3.75 per inch, which over 88 sts would actually make it 24 or 25" around.
sue- knitting heretic