Maybe it's my english which is too bad ... i think i just don't understand the sentence in the same way than you:
when he wrote "Line 10", i thought it was a typo error and that we should read "char 10" instead (indeed, that was matching the sample he gave)
By the way, i read the bold line and he explicitly talk about 4 length, he never specified it could be larger .
Or am I missunderstanding something ?
I understood he wanted to count the number of BELL occurence appearing in field starting at char 10 and have a length of 4
(just as it appear in his example).
I didn't figure his problem was about having BELLLLLLLLLLLLL occurrence (if so, i suppose he would have put such an entry in the sample)
You are true that my code does not handle with BELLLLLLLLLLLLL : it count them as if it were a BELL one.
I just assumed that his input file was a file formatted the same way than the sample he gave.