You can do this with simple edit in the template for categories.
If you use top category, edit this file:
storefront/view/default/template/blocks/category_top.tpl
In the code, everywhere you see <?php echo $category['name']; ?>
change it to
<?php echo $category['name'] . "(".$category['product_count'].")"; ?>
Similar for <?php echo $scat['name']; ?>