%\documentclass{article} \documentclass[draft]{article} \newenvironment{countwords}{ #### ここは秘密 #### }{\par There are \thewords\ words. } \def\shownumbers{% \stepcounter{words}% \vbox to 0pt {\kern1pt \hbox to 0pt{\hss\tiny\thewords} \vss}} \newcounter{words} \begin{document} \begin{countwords} The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog, The quick brown fox jumps over the lazy dog. \end{countwords} % 結果は There are 27 words. と出た。 \end{document}