I'm trying to automatically generate commands based on the value of a counter:
\documentclass{article}
\newcounter{count}
\newcommand\generator[1]%
{%
\stepcounter{count}%
\expandafter\def\csname#1\endcsname{\thecount}%
}
\generator{one}
\generator{two}
\begin{document}
\one
\two
\end{document}
the expected output would be "12" instead of "22".