The formula looks for the string of text before the first hyphen, then adds the numbers in column B that contain the same characters.

So there's 2 C2's therefore 3 + 1 = 4

So there's 2 C55's therefore 4 + 5 = 9

So there's 1 C43 therefore = 2