See if I get you right, but I think that you want the values (not observations) that has most occurrences on each row/observation, and the number of occurrences.
If this is the case, it seems that your sample output is a bit incorrect. Wouldn't rather be like:
a b c d e most_obs count
1 1 1 2 3 1 3
5 5 6 5 2 5
3
9 9 2 0 8
9 2
Maybe you can solve this via some data step programming. But a more generic way is to transpose the data, then use SQL with COUNT and HAVING to find out your new columns, and then join back to the original table. This means you will need an id column. If you don't have one, you can easily create it using _n_ in a data step.
/Linus
Data never sleeps