1 of 2

k, 22 bytes

The argument can be any list - strings, numerics etc.

{+/,/10+(#:'=x)#\:!41}

The q translation is easier to read:

{sum raze 10+(count each group X)#\:til 41}