As has been noted, you need to actually fetch the data once you've SELECT'ed it. Try something like:
$result = $TotalRow->fetch_assoc();
after you query the DB and change your echo statement to use the $result associative array.
EDIT: Just re-read your post and noticed that you're using the PEAR DB class. Sorry about that - my mistake. Instead of fetch_assoc(), it would be getAssoc(). Then again, if you're just SELECT'ing one column, there's really no need for an array at all; instead just use getOne().