Pergunta de entrevista da empresa Microsoft

Phone interview 2: Write a function that accepts a string and returns the number of words in it. How will you test it?