I am currently writing a research essay and was wondering if it is possible to create a function that links a small part of the output of the texcount function to another location in the file, in my case the title page.
Here is a MWE (minimum working example) of my LaTeX file:
\documentclass[12pt,a4paper,footheight=20pt,footsepline,headheight=20pt,headsepline]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[nottoc,numbib]{tocbibind}
\usepackage{scrlayer-scrpage,xcolor,lastpage,verbatim,moreverb,lmodern,textcomp,tikz,float,pgf,pgfplots,hyperref}
\pgfplotsset{compat=newest}
\ihead{\color{gray} ...}
\chead{\color{gray} ...}
\ohead{\color{gray} ...}
\cfoot{\color{gray} \thepage\ of \pageref{LastPage} }
\setcounter{secnumdepth}{3}
\setlength{\headheight}{25pt}
\usepackage{setspace}
\doublespacing
\addtokomafont{headsepline}{\color{gray}}
\addtokomafont{footsepline}{\color{gray}}
\immediate\write18{texcount -sum main.tex > wordcount}
\newcommand\wordcount{\verbatiminput{wordcount}}
\title{...}
\author{...}
\date{\vspace{8cm} 4000 Words in Essay || 500 Words in RPPF}
\begin{document}
\maketitle
\thispagestyle{empty}
\newpage
\tableofcontents
\newpage
\section{Introduction}
\newpage
\section{...}
\newpage
\section{Conclusion}
\newpage
\begin{thebibliography}{}
\bibitem{xxx}
\bibitem{yyy}
\end{thebibliography}
\newpage
\section{RPPF}
\newpage
\wordcount
\end{document}
I apologize for the unorthodox use of the date function :D
Essentially what I want to do is replace the "500" in the date by a self-updating word count of the RPPF section.
If this is possible please let me know.
Thanks