The script below creates a listing of the categories in the site (excluding those in “uncategorized”).
If possible, I’d like to modify it so that it only lists the top level categories (no child categories)…
$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);
$cat_args['title_li'] = '';
$cat_args['exclude_tree'] = 1;
wp_list_categories(apply_filters('widget_categories_args', $cat_args));
After some trial and error, this is what it took to make it work…
I added the ‘depth’ argument to your array. Check out the Codex Page for full documentation of the function.