Create formulas like this, one per possible medname:
if isnull({table.medname1}) or
trim({table.medname1}) = "" then
0 else 1
Then create a final formula like this:
sum([{@medname1},{@medname2},...{@medname10}])
This will not tell you the number of distinct names, only the total number of names per row.
-LB