at the example of the default theme:
hardcoded category list in sidebar:
<ul>
<?php
$variable = wp_list_categories('echo=0&depth=1&show_count=1&title_li=<h2>Categories</h2>');
$variable = str_replace('(1)', '<span>1 entry</span>', $variable);
$variable = str_replace('(', '<span>', $variable);
$variable = str_replace(')', ' entries</span>', $variable);
echo $variable;
?>
</ul>
(this is a variation of: https://codex.www.ads-software.com/Template_Tags/wp_list_categories#Remove_Parentheses_from_Category_Counts)
style.css for it:
.categories .cat-item { border-bottom: 1px dotted #06c;
position:relative; }
.categories .cat-item a { height:20px;
position:absolute; left: 0px; top:4px;
background:#ffc;padding-right:8px; }
.categories .cat-item span { height:20px;
position:absolute; right: 0px; top:4px;
background:#ffc;
padding-left:8px; color:#06c; font-size:9px; }
.categories ul.children {display:none; }
screenshot