UBB.classic does not have unique post IDs - you'll need to add things up manually. (Topic numbers are unique to the forum, and post numbers are unique to topic. The joys of using flat files... one of the major reasons that you won't find too many UBB.classic boards on your site is due to the basic limitations of our architecture. We always advise keeping less than 3,000 topics in one forum for best performance.)
Doing a complete sum of the posts actually somewhat easy if you have Firefox/Mozilla and UltraEdit - you can use Ctrl + click to select the columns in the forum summary table, then copy to the clipboard. Paste in UltraEdit, do a replace of each tab with a newline, then switch into column mode, select all, and do a column sum.
Now, this isn't true for UBB.threads, which does have unique post numbers. Look at the Number= value in the query string when visiting the latest topic. Do note that this number is the total number of posts ever, as opposed to the total current number of posts. For example,
TrekBBS 's last post number is approaching three million (currently 2,996,000 - we'll hit 3 million within the next 24 hours at the normal rate of 4,000 new posts a day), but I have to keep the database pruned to around 400,000 posts due to us not having enough money to afford the server setup we need...
UBB.x/Eve uses random OIDs for each topic and post, so you'll need to use the same column add trick with it as well.