Problem
I want to include a word count in my document, using texcount. But I also want to include a comma as a thousand separator. This is the code I came up with:
\makeatletter\@@input|"echo `texcount -1 -sum=1,1,1,1,1,1,1 -merge -incbib -utf8 \jobname.tex`| sed `s/^\(.\{1\}\)/\1,/`| cut -c1-5"\makeatother
However, there are special characters in the sed command: backslash and braces. LaTeX is thus unable to run this line of code.
Attempted Solutions
I tried escaping the backslashes and braces with \textbackslash, \{, and \}, but it doesn't work. I also tried substituting \makeatletter\@@input by \immediate\write18, but it doesn't work either.
