Another way would be to add your storecount
variable to a template file with either:
// To get the TEXT value of the custom variable:
Mage::getModel('core/variable')->setStoreId(Mage::app()->getStore()->getId())->loadByCode('custom_variable_code')->getValue('text');
// To get the HTML value of the custom variable:
Mage::getModel('core/variable')->setStoreId(Mage::app()->getStore()->getId())->loadByCode('custom_variable_code')->getValue('html');
If you're wondering which template, turn on Template Path Hints and you should be able to find where to add it into a template file. Don't override a core template, copy it into your theme's directory, so make a copy of it somewhere like app/design/frontend/[Your Design Package]/[Your Theme]/template/catalog/category/view.phtml
. If you don't follow this practice you will loose your work when you upgrade Magento.
It's probably better practice to create CMS blocks and add it to your template files so it is easier to edit and turn off.
create your CMS block with your content including {{customVar code=storecount}}
and add it where you need to in your template files with:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('your_cms_block_identifier')->toHtml() ?>
UPDATE
Just had a proper look at Marius's answer - his solution seems very neat and adds the constitutionality you need to Magento.