Every time you find a matching letter, you do not increment %o1. Thus you will always only advance to the first match, and then you are stuck.
If your eq will contain inc %o1, it should work.
The function will return on a "no match" string. Move the counter increment above the o1 increment and add a jump to "next:"
cmp %o0, %o2
bne next
nop
eq: inc %l0
nop
next: inc %o1
ba loop