\documentclass[12pt]{article}
\parindent=0pt
\usepackage{color}
\newcommand{\StrokeOne}{I}
\newcommand{\StrokeTwo}{II}
\newcommand{\StrokeThree}{III}
\newcommand{\StrokeFour}{IIII}
\newcommand{\StrokeFive}{\rlap{\raise1ex\hbox{\underline{%
	\hphantom{\StrokeFour}}}}\StrokeFour%
}
\newcount\tallycount
\newcommand{\dotally}{%
	\loop\ifnum\tallycount>4\relax\StrokeFive\
	\advance\tallycount by-5\repeat
	\ifcase\tallycount\or\StrokeOne\or\StrokeTwo\or
	\StrokeThree\or\Strokefour\else ERROR\fi\unskip%
}
\newcommand{\tally}{\afterassignment\dotally\tallycount }

\begin{document}
\textcolor{red}{Zero}: \tally 0.

\textcolor{red}{Two}: \tally 2.

\textcolor{red}{Twelve}: \tally12.

\textcolor{red}{Hundred}: \tally100.
\end{document}
