I have a data table that looks like this:

STR-S	SNK-S	STR-K	STR-F	SNK-S	STR-3	STR-2	STR-F	SNK-S	SNK-4	SNK-S	STR-3	SNK-F	STR-4	STR-O
"STR", etc at the beginning are pitch types, SNK is Sinker for example. The end character is the result of the pitch, a 4 would be a home run, a 3 a triple, and so forth. O is out, F is foul, S is strike --- you get it.

How can I figure the amount of RBI's? I know that it's 5, but I can't think of any automated way to calculate this, anyone got any ideas?

THANK YOU!!