We're finishing up and testing a Forum stats hack that uses the datastore to cache the information that might work for what you want. Putting it in the header will mean queries running on every page, though. Do you really want that?
Hmmmm ... Unless you just unserialize for the header info and have it only update the stats in the fourm themselves. Then you might be able to pull it off having it in the header and not running any queries.