Notes on making the LaTeX markup language do what you want it to do.
Here is a command that lets you do different things with numbers depending on their magnitude.
\newcommand{\formatnumber}[1?]{
\ifnum#1=0 {\bf zero} \else \ifnum#1<2 {\bf one} \else
{\bf two or more}\fi
\fi
}
2 pages link to LaTeXNotes: