While that option will work there's no need to use a query (and add to the server load) to get this stat.
The following attached will do just fine (or use the code below and create a plugin for global_start).
Code:
require_once(DIR . '/includes/functions_forumlist.php');
cache_ordered_forums(1, 1);
$totalthreads = 0;
$totalposts = 0;
if (is_array($vbulletin->forumcache))
{
echo "yup";
foreach ($vbulletin->forumcache AS $forum)
{
$totalthreads += $forum['threadcount'];
$totalposts += $forum['replycount'];
}
}
$totalthreads = vb_number_format($totalthreads);
$totalposts = vb_number_format($totalposts);