You could put this in class_template.php under "private function assignTemplateVars()":
PHP Code:
$itemTotal= $mysidia->db->select("inventory", array("iid"), "owner = '{$mysidia->user->username}'")->rowCount();
$this->assign("itemTotal",$itemTotal);
Now in your template.tpl you can display the user's total amount of items in the inventory with {$itemTotal}