Apologies if I'm rude here, but a question should be structured and well presented. Well, your post lacks the latter. In as much detail as possible, could you edit your post so that your question is more clear?
I think I understand what you want. You want the user to enter a string. You then take the string then tell the user the the amount of times a word occurred. Correct?