in

Get list of all categories including their post count in WordPress

<div class="categories-list">
	<?php $categories = get_categories(); ?>
	<ul>
		<?php foreach($categories as $category) { ?>
		<li><a href="<?php echo get_category_link($category->term_id); ?>"><?php echo $category->name; ?> (<?php echo $category->count; ?>)</a></li>
		<?php } ?>
	</ul>
</div>