Back to labs/answer key page
tr ' ' '\012' < daffodils | sort | uniq -c
uniq removes duplicate lines, but only if they occur right next to each other. The -c option counts how many there were.