... works when counting single characters but could fail to count a multi-character sequence that falls right along the read-chunk boundary (such that one-half is in one read and the other half is in the other). ... could also present more-serious problems if the characters being sought (or any characters) are multibyte.