Hi:
I'm not sure what you mean by "count as a subtotal"...for example, the output from this program is too lengthy to post, however, there are two ways to get a count of the number of regions -- #1 puts the count of regions as a separate LINE and #2 puts the count of regions on the same grand total line as the total SALES sum.
If what you mean is that you would want to see the count of regions (3) under the SALES sum as a separate subtotal line, then refer to the example "Adding Multiple Summary Rows" that starts on page 7 of this paper:
http://support.sas.com/rnd/papers/sgf07/sgf2007-report.pdf
cynthia
[pre]
ods listing close;
options nodate nonumber center;
ods html file='c:\temp\getcount.html' style=sasweb;
proc report data=sashelp.shoes nowd;
title '1) Use LINE statement';
where region in ('Asia', 'Canada', 'Pacific');
column region product sales;
define region / order;
define product / display;
define sales / sum;
compute before region;
holdreg +1;
endcomp;
rbreak after / summarize;
compute after;
line 'Number of Regions: ' holdreg comma6.;
endcomp;
run;
proc report data=sashelp.shoes nowd;
title '2) Put N in space for Region on Total Line';
where region in ('Asia', 'Canada', 'Pacific');
column region product sales;
define region / order;
define product / display;
define sales / sum;
compute before region;
holdreg +1;
endcomp;
rbreak after / summarize;
compute after;
tmpvar = catt('N =',put(holdreg, comma6.));
region = tmpvar;
endcomp;
run;
ods html close;
[/pre]