def count_construct_rec(target, word_bank):
    """Counts the number of ways that 'target' can be constructed.

    Args:
        target (str): The string to be constructed.
        word_bank (Iterable[str]): Collection of string from which 'target'
            can be constructed.

    Returns:
        int: The number of ways that the 'target' can be constructed by
            concatenating elements of the 'word_bank' array.
    """
    if target == '': return 1
    total_count = 0

    for word in word_bank:
        if target.find(word) == 0:
            num_ways_rest = count_construct_rec(target[len(word):], word_bank)
            total_count += num_ways_rest

    return total_count