Index: /trunk/tools/diskspace/merge_counts_and_sizes.pl
===================================================================
--- /trunk/tools/diskspace/merge_counts_and_sizes.pl	(revision 32621)
+++ /trunk/tools/diskspace/merge_counts_and_sizes.pl	(revision 32622)
@@ -29,12 +29,15 @@
     chomp;
     unless ($_ =~ /^#/) {
-	($stage_product,$size_in_gb) = split /\s+/;
+	($stage_product,$size_in_gb,$count) = split /\s+/;
 	($stage,$product) = split /_/, $stage_product;
 
 	$size{$stage}{$product} = $size_in_gb;
+	$diskcount{$stage}{$product} = $count;
 	$total += $size_in_gb;
     }
 }
 close(S);
+
+$diskcount{"EXTERNAL"}{"UNKNOWN"} = 1;
 
 my $count_file = "neb:///ipp_diskspace/${datestring}/run_im_counts.dat";
@@ -92,4 +95,5 @@
 	    if ($N{$stage}{$product} > 0) {
 		$VpN{$stage}{$state} += $map{$stage}{$product}{$state} * $size{$stage}{$product} / $N{$stage}{$product};
+		$DVpN{$stage}{$state} += $map{$stage}{$product}{$state} * $size{$stage}{$product} / $diskcount{$stage}{$product};
 	    }
 #	    print STDERR ">>$stage $product $state $map{$stage}{$product}{$state} $N{$stage}{$product} $count{$stage}{$state} $size{$stage}{$product} $VpN{$stage}{$state}\n";	    
@@ -156,9 +160,10 @@
 	}
 	$labels{$label} += $V;
-	printf("%-8s %-18s %-10s %14.4f %12.6f %9d\n",
-		$stage,$state,$label,$V,$VpN{$stage}{$state},$count{$stage}{$state});
+	$alt_labels{$label} += $DVpN{$stage}{$state} * $count{$stage}{$state};
+	printf("%-8s %-18s %-10s\t%14.4f %12.6f\t%14.6f %12.6f\t%9d\n",
+		$stage,$state,$label,$V,$VpN{$stage}{$state},$DVpN{$stage}{$state} * $count{$stage}{$state},$DVpN{$stage}{$state},$count{$stage}{$state});
 	if (exists($opt{N})) {
-	    printf($out_fh "%-8s %-18s %-10s %14.4f %12.6f %9d\n",
-		   $stage,$state,$label,$V,$VpN{$stage}{$state},$count{$stage}{$state});
+	    printf($out_fh "%-8s %-18s %-10s\t%14.4f %12.6f\t%14.6f %12.6f\t%9d\n",
+		   $stage,$state,$label,$V,$VpN{$stage}{$state},$DVpN{$stage}{$state} * $count{$stage}{$state},$DVpN{$stage}{$state},$count{$stage}{$state});
 	}
     }
@@ -167,14 +172,15 @@
 foreach $l (keys %labels) {
     $sum += $labels{$l};
-    print STDERR "\t$l  \t$labels{$l}\n";
+    $alt_sum += $alt_labels{$l};
+    print STDERR "\t$l  \t$labels{$l}\t$alt_labels{$l}\n";
     if (exists($opt{N})) {
-	print $out_fh "\t$l  \t$labels{$l}\n";
+	print $out_fh "\t$l  \t$labels{$l}\t$alt_labels{$l}\n";
     }
 }
-print STDERR "\tTOTAL    \t$sum\n";
+print STDERR "\tTOTAL    \t$sum\t$alt_sum\n";
 print STDERR "\tEXP_TOT  \t$total\n";
 
 if (exists($opt{N})) {
-    print $out_fh "\tTOTAL    \t$sum\n";
+    print $out_fh "\tTOTAL    \t$sum\t$alt_sum\n";
     print $out_fh "\tEXP_TOT  \t$total\n";
     close($out_fh);
Index: /trunk/tools/diskspace/nebulous_wiki.pl
===================================================================
--- /trunk/tools/diskspace/nebulous_wiki.pl	(revision 32621)
+++ /trunk/tools/diskspace/nebulous_wiki.pl	(revision 32622)
@@ -32,4 +32,5 @@
 	$sum{$volume} += $size;
 	$sizes{$what}   += $size;
+	$counts{$what}  += $count;
     }
     close(F);
@@ -88,5 +89,6 @@
     foreach $w (sort (keys %sizes)) {
 	$val = $sizes{$w} / 1024 / 1024 / 1024;
-	print $out_fh "$w $val\n";
+	$v2  = $counts{$w};
+	print $out_fh "$w $val $v2\n";
     }
     close($out_fh);
