bc<<<fold -1|tr "\n "adgjmptwbehknquxcfilorvysz +1[1*8][2*8][3*8]44

Folds one char per line, transliterates each newline with +, each space with 1 and each letter with the corresponding number of pushes. bc does the sum. For some reason direct pipe to bc gives input error.