WordCount and rename file - Siri Shortcuts

This shortcut can be useful for quickly determining the word count of a document without having to open it. It could be particularly handy for writers, editors, or anyone who needs to keep track of word counts in their files.

Get Selected Files in Finder: This action gets the files selected in Finder.
Count Words in File: This action counts the words in the selected file.
Set variable Count to Count: This action sets a variable “Count” to store the number of words counted.
Rename File to Name W= Count: This action renames the file to include “W=” followed by the word count at the end of each filename.