Blog Categories

$vid = 16; // Set the vid to the vocabulary id of the vocabulary you wish to list the terms from
$items = array();
$terms = taxonomy_get_tree($vid);
foreach ( $terms as $term ) {
$count = db_result(db_query("SELECT COUNT(tn.nid) FROM {term_node} tn JOIN {node} n USING (nid) WHERE tid=%d AND n.status=1", $term->tid));

if ($count) { /* don't show terms with 0 count */
$items[] = l($term->name, "taxonomy/term/$term->tid") . " ($count)";
//$items[] = str_repeat('-', $term->depth) . l($term->name,'taxonomy/term/'.$term->tid)." (".$count.") - ".$term->description;
}

}
if ( count($items) ) { print theme('item_list', $items);}
?>