Broadcom Interview Question

How to count repeated words in a sentence using Perl? Create a test plan for a pen.