def NumSearch(big, sub):
    """
    Helper function for ModelML. Returns the number of times the string sub appears in the string big.
    sub: string of shorter or equal length to big
    big: string to search in
    """
    results = 0
    subLen = len(sub)
    for i in range(len(big)): 
        if big[i:i + subLen] == sub:
            results += 1
    return results