If you have a custom category layout, you may want to display the number of posts in that category. This can simply be achieved by placing the following code into your template file (probably category.php)…
$customcats = get_categories(); $categorycount = $customcat->count; echo $categorycount;