hey, i have the solution! for all your problems!
first of all, get rid of the /" and the \" in the line of code you posted above.
moreover, you will see that there is a little problem with this bit of additional code. all comments of your subblogs will get "streamed" on your main-blog. however the comments of the mainblog-posts itself won't show up.
i tried a little bit and found the solution, it's the follwoing line.
if (is_array($r)) return $r[0];
replace it with...
if (is_array($r)) return $r[0] + $count;
and everything will work perfectly..
so the whole working code would look like this:
function sitewide_tags_get_comments_num($count)
{
global $blog_id,$wpdb,$post;
$tags_blog_id = get_site_option('tags_blog_id');
if (!$tags_blog_id || $blog_id!=$tags_blog_id) return $count;
$base = $wpdb->base_prefix;
list($post_blog_id,$post_id) = explode('.', $post->guid);
$r = $wpdb->get_col("SELECT comment_count FROM $base{$post_blog_id}_posts WHERE ID=$post_id");
if (is_array($r)) return $r[0] + $count;
return $count;
}
add_filter('get_comments_number', 'sitewide_tags_get_comments_num');