Script for counting phrases.