For the main forum page (index.php), total PMs is $allpm[messages].
For the inbox display page (private.php), you'll need to add it yourself:
Code:
$ignoreusers="";
if (trim($bbuserinfo['ignorelist'])!="") {
$ignoreusers='AND fromuserid<>'.implode(' AND fromuserid<>',explode(' ', trim($bbuserinfo['ignorelist'])));
}
$allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] $ignoreusers");
then use $allpm[messages].
In any file/template, $pmquota is the total PMs allowed.