Added count_substrings
Added generate_numbers