Count of all character, one per line
awk '{for(i=1;i<=NF;i++)if(!a[$i]++)print $i}' FS= *.xml
Count of all character, same line
awk '{for(i=1;i<=NF;i++)if(!a[$i]++)print $i}' ORS= FS= *.xml
Count words in a file
This command will do the trick
uniq -c file-to-count.txt
Count Occurrences of Search String
In UNIX/Linux, you can use grep and wc to count occurrences
cat mystuff.txt | grep -i "search" | wc -l
