You can easily get the number of connections from a Doctrine_Manager object since it implements the Countable interface.
// test.php
// ...
$num = count($manager);
echo $num;
The above is the same as doing:
// test.php
// ...
$num = $manager->count();