def fun(text,word):
    i=0
    while text.find(word)!=-1:
        i+=1
        text=text[text.find(word)+1:]
        fun(text,word)
    return i
    
    
print fun('asdasdasd','a')
  