Is there a built-in function in PHP or MySQL that will provide the total number of MySQL queries used on a page? I've seen on a lot of sites (mainly forums) they have a message at the bottom saying something like "Page generated in 0.6 seconds with 20 queries".
If there's nothing built in then I'll add something to my database class to count them, but it seems like the kind of functionality that would already be available.