It'll show wherever you execute an $obj->showQueries() call. If you want to extract it to a variable, and you will need to do this on any script anyways, you can do so by rewriting the function to this:
return "Total Queries: " . $this->queriesRun;
And assigning it as:
$var = &$obj->showQueries();
Now anytime you echo $var, it will be the value of $obj->showQueries.