single line command
cat file1.txt |tr " " "\n"|sort|uniq -c |sort -n -r -k 1 |grep -w -f list.txt
The last part of the command tells grep to read words that match the list (-f), and then match the whole words (-w), that is, if the car is in list.txt, grep should ignore the carriage.
However, keep in mind that your view of the whole word and the appearance of grep may differ. eg. although the car will not correspond to the carriage, it will correspond to a car wash, note that a “-” will be considered for the word boundary. grep accepts anything but letters, numbers, and underscores as the word boundary. This should not be a problem, as it corresponds to the accepted definition of the word in English.
source share