In order to get the total number of items, you will have to either extend Zend_View_Helper_PartialLoop to provide a method that returns the count of the iterable object being used by the PartialLoop.
Or, and I would say this is probably easier, just get the count of items in the object before you pass it into the PartialLoop since you have to pass either a Traversable object or an actual array into the PartialLoop helper and both implement support for count().
From the documentation:
<?php // partialLoop.phtml ?>
<dt><?php echo $this->key ?></dt>
<dd><?php echo $this->value ?></dd>
<?php // MyController.php
public function indexAction()
{
$this->view->$model = array(
array('key' => 'Mammal', 'value' => 'Camel'),
array('key' => 'Bird', 'value' => 'Penguin'),
array('key' => 'Reptile', 'value' => 'Asp'),
array('key' => 'Fish', 'value' => 'Flounder'),
);
$this->view->modelCount = count($this->view->model);
}
From index.phmtl
<p>Count: <?= $this->modelCount ?></p>
<dl>
<?php echo $this->partialLoop('partialLoop.phtml', $this->model) ?>
</dl>