Add solution and tests for countSubstrings

Пише се `occurrences` :gb: