total score with MC questions, Please help

Hi List,
I have a SPSS file in which I have input the data for some multiple choice math tests. In each cell I have put the option number that the test-takers have chosen. That is, in each raw in front of each case number there are option numbers 1,2,3,4.
How can I compute total scores for each student with this data entry?
can syntax help?
can I give the test key to the syntax so that if the number in each cell matches the key then it considers it a one? and adds these ones?
and if yes how? what should the command look like?
Thanks alot.