Hi,

I have survey data. Both the variables a7 and a8 are survey variables having multiple options coded as 1, 2, and so on.
The objective is to count the frequency of each option (like 1, 2, -888) in each variable.

The data for both the variables is given below.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str11 a7 str9 a8
"1 2"         "128"  
"1 2 -888"    "2478" 
"1 2 3"       "1345" 
"1 2 3 -888"  "125"  
"1 2 3 4"     "237"  
"1 2 3 4 5"   "3578" 
"1 2 3 4 5 6" "1456" 
"1 2 3 4 6"   "3467" 
"1 2 3 5 6"   "13679"
"1 2 3 6"     "4789" 
end
Appreciate your help.