I tried finding it everywhere too and did the replacements.
Thanks. I edited your snippet..
<?php
$categories = get_categories();
foreach ($categories as $cat)
{
?>
<li class="cat-item">» cat_ID ); ?>"><?= $cat->cat_name; ?> <?= '('.$cat->category_count.')' ?>
<?php
}
?>
The following displays the links like:
Hi
This took me a long time to find
wp-includes/general-template.php
Find this function “get_archives_link”
You can add li, css, class and other style and alt tags to your wp_get_archives.
WordPress manual only mentions the function, they only say about the actual function and not the way the link is generated. I found the post here:
http://www.webmasterworld.com/content_management/3633169.htm