Well, that's completely different from the numbers of users logged on; hence the confusion.
My guess (not using MySQL, but knowing how to use Google) would be to use some sort of SHOW query (I'm sure MySQL's manual has information about what you can ask for).
Ah, yes. Here we go. Easy when you know how.
http://dev.mysql.com/refman/5.0/en/show-status.html
Threads_connected is the field you want. I wonder if that is the same as the "Threads" field you get if you use [man]mysql_stat[/man]?