Word counter

Complete the function counter to return the number of words in a given string.
# complete the following function...
def counter(text): return
print(counter('Python is a powerful programming language.')) # expected: 6 print(counter('Learning new skills can be both challenging and rewarding.')) # expected: 9
Python
Setting up Python environment...
Output