test/cases/0160-string: add tests and small fix for count_substrings