This procedure finds the tags that have posts associated with them, and assembles a list based on the first letter:
$list = '';
$tags = get_terms( 'post_tag' );
$groups = array();
if( $tags && is_array( $tags ) ) {
foreach( $tags as $tag ) {
$first_letter = strtoupper( $tag->name[0] );
$groups[ $first_letter ][] = $tag;
}
if( !empty( $groups ) ) {
foreach( $groups as $letter => $tags ) {
$list .= "\n\t" . '<h2>' . apply_filters( 'the_title', $letter ) . '</h2>';
$list .= "\n\t" . '<ul>';
foreach( $tags as $tag ) {
$url = attribute_escape( get_tag_link( $tag->term_id ) );
$count = intval( $tag->count );
$name = apply_filters( 'the_title', $tag->name );
$list .= "\n\t\t" . '<li><a href="' . $url . '">' . $name . '</a> (' . $count . ')</li>';
}
$list .= "\n\t" . '</li>';
}
}
}else $list .= "\n\t" . '<p>Nenhuma Tag foi encontrada</p>';
From there, it's up to you how to call the method, or even if you want to use this process in this way. In the middle of the code there are enough things that can be reduced, but the idea is basically this. All you have to do is print ($list)
that you have access to everything.