PROBLEM SOLVED:
<?php
$categories = wp_list_categories(‘title_li=&show_count=1&echo=0’);
$categories = ereg_replace('</a> \(([0-9]+)\)', ' <span class="count">[\\1]</span></a>', $categories);
echo $categories;
?>
At the previous post the </a>
closing tag was cutted off by this board system.