Another [albeit less-efficient] way to count missing obs by row, is to hard code missing-data indicators and sum. I prefer this way because you are all set to go when you want to understand whether the structure of missing-ness is dependent on a set of covariates (to test MAR/MCAR/..) or when constructing an inverse-weighted missing-data probability regression, for example.

/* x1 and x3 subject to missing values */
data miss;
input obs y x1 x2 x3;
datalines;
1 0 0.23 0.39 -0.38
2 0 0.1 0.6 -0.48
3 1 0.1 -0.77 -999
4 1 0.6 -0.95 -999
5 1 -999 0.81 -999
6 1 -999 0.89 0.43
7 0 -0.58 -0.06 0.98
8 1 0.07 0.66 -999
9 0 -999 1 0.45 0.45
10 1 -1.84 0.66 -999
run;

data miss_ind;
set miss;
array a(3) x1-x3;
do i=1 to 3;
if a(i)=-999 then a(i)=.; end;
/* define R1= 1 if x1 is missing, and 0 if obberved */
R1=0; if x1=. then R1=1;
R3=0; if x3=. then R3=1;
ROWMISS= R1+R3;
drop i;
run;
proc print data= miss_ind; run;

proc logistic data= miss_ind;
model R3= x2;
output out=EstProb p=x3prob;
run;
proc print data=EstProb; run;

/* Weights*/
data wgt_est;
set EstProb;
w3=1/x3Prob; ...