Look at how vBulletin counts them before you claim anything is wrong.
PHP Code:
$totalthreads += $forum['threadcount'];
$totalposts += $forum['replycount'];
All I did was follow their way of doing it.
If you think it is wrong, just take out the code for the percentages. I'm going to remove it in the update, anyway.
And give me a link to your test board in pm so I can check it out.