AMD Interview Question

how would you write a code toe determine how many words there are in a paragraph