Iterative DP function to find the number of times the second string occurs in the first string , whether continuous or discontinuous
def count ( a , b ) : NEW_LINE INDENT m = len ( a ) NEW_LINE n = len ( b ) NEW_LINE DEDENT