R, 130 bytes
Previous version was broken. Thanks to @Giuseppe who pointed was paste was not required also saved 23 bytes.
function(x,z=rep(c("afilmou5679=:","hps12'","ntxz","cgr","e","()",",",'"'),c(2:5,7,9,16,21)))lengths(regmatches(z,gregexpr(x,z)))
JayCe
- 3k
- 13
- 17