Ah yes, the forumid isn't saved along with the posts, try:
PHP Code:
// get total posts
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads, SUM(replycount) AS posts FROM thread WHERE forumid NOT IN(1,2,3)');
$totalthreads=number_format($countthreads['threads']);
$totalposts=number_format($countthreads['posts']+$countthreads['threads']);
Again, untested, but this time should work