def count_instance_of_str(string1, string2):
    """Counts characters in string1 that are also in string2."""

    count = 0

    #for each char in string1, check if it's in string2
    for char in string1:
        if char in string2:
            count += 1

    return count