IBM Interview Question

function nStrStr(str1, str2) How many str1 appeared in str2