\begin{filecontents*}{disccounters.sty}
\RequirePackage{keyval2e}
\long\def\gobble@to@relax#1\cpt@relax{}
\kve@definekeys[DC]{disccount}[disc@]{%
format/\@firstofone,
numbertype/\arabic/
\ifescapedTF{#1}{%
\xifinsetTF{,\detokenize{#1},}{%
,\detokenize{\arabic,\alph,\Alph},%
}{}{%
\@latex@error{Invalid number type '\detokenize{#1}'}\@ehc
}%
}{%
\@latex@error{Number type '\detokenize{#1}' must be escaped}\@ehc
},
}
\newcounter{disccounter@aux}
\BeforeStartOfDocument{%
\ifdefTF\disccounter@hook{}{%
\def\disccounter@hook{}%
}%
}
\newcommand*\discc@unter@aux{\the\numexpr\thedisccounter@aux-20000\relax}
\robust@def*\DefineDiscCounters{\cpt@testopt\disc@definecounters{}}
\robust@def*\disc@definecounters[#1]#2{%
\cptexpandargonce{\kve@setafterdefaults[DC]{disccount}}{#1}%
\setcounter{disccounter@aux}{0}%
\docommalist{#2}{%
\newcounter{##1}%
\expandafter\newcommand\csname show##1\endcsname[1][]{%
\stepcounter{##1}%
\stepcounter{disccounter@aux}%
\cptexpandargonce{\kve@setafterdefaults[DC]{disccount}}{####1}%
\xifinsetTF{,##1@reset@\discc@unter@aux,}%
{,\disccounter@hook,}{}{\disc@format{\disc@numbertype{##1}}}%
}%
\csn@def{reset##1}{%
\ifnum\csname c@##1\endcsname=\@ne
\xifinsetTF{,##1@reset@\discc@unter@aux,}{,\disccounter@hook,}{}{%
\xdef\disccounter@hook{%
\ifcsemptyTF\disccounter@hook{}{\disccounter@hook,}%
##1@reset@\discc@unter@aux
}%
}%
\fi
\setcounter{##1}{0}%
}%
}%
}
\AtEndDocument{%
\if@filesw
\immediate\write\@auxout{%
\gdef\string\disccounter@hook{\disccounter@hook}%
}%
\else
\@latex@warning@no@line{File '\jobname.aux' not open}%
\fi
}
\newcommand*\discbraced[1]{{\tt\string{#1\string}}}
\endinput
\end{filecontents*}
\documentclass{article}
\usepackage{disccounters}
\usepackage{color}
\DefineDiscCounters[numbertype=\arabic]{counterone,countertwo,counterthree}
\begin{document}
\begin{enumerate}
% If you hate the optional argument, you can use the plain \show...
% (without argument), or put the optional arguments in a command (see later).
\item \showcounterone \showcounterone \showcounterone
\resetcounterone
\item \showcounterone[numbertype=\alph]\showcounterone[numbertype=\alph]%
\resetcounterone
\item \showcounterone
\resetcounterone
\item \showcounterone[numbertype=\arabic]\showcounterone[numbertype=\arabic]%
\showcounterone[numbertype=\arabic]\showcounterone[numbertype=\arabic]%
\resetcounterone
\item \showcounterone
\resetcounterone
\item \showcounterone[numbertype=\Alph]\showcounterone[numbertype=\Alph]
\resetcounterone
\end{enumerate}
\begingroup
\color{red}
\begin{enumerate}
\item \showcountertwo \showcountertwo \showcountertwo
\resetcountertwo
\item \showcountertwo[numbertype=\alph]\showcountertwo[numbertype=\alph]%
\resetcountertwo
\item \showcountertwo
\resetcountertwo
\item \showcountertwo[numbertype=\arabic]\showcountertwo[numbertype=\arabic]%
\showcountertwo[numbertype=\arabic]\showcountertwo[numbertype=\arabic]%
\resetcountertwo
\item \showcountertwo
\resetcountertwo
\item \showcountertwo \showcountertwo
\resetcountertwo
\end{enumerate}
\endgroup
\begingroup
\color{blue}
\def\tempa{numbertype=\alph,format=\discbraced}
\def\tempb{numbertype=\arabic,format=\discbraced}
\begin{enumerate}
\item \showcounterthree \showcounterthree \showcounterthree
\resetcounterthree
\item \showcounterthree[\tempa]%
\showcounterthree[numbertype=\Alph,format=\discbraced]%
\resetcounterthree
\item \showcounterthree
\resetcounterthree
\item \showcounterthree[\tempb]\showcounterthree[\tempb]%
\showcounterthree[\tempb]\showcounterthree[\tempb]%
\resetcounterthree
\item \showcounterthree
\resetcounterthree
\item \showcounterthree \showcounterthree
\resetcounterthree
\end{enumerate}
\endgroup
\end{document}

\showcounterto depend on future info: you'll need to use the aux file to record that. However, it looks like you have a higher-level goal in mind, and that might be easier to do; what is it then? – Bruno Le Floch Dec 17 '11 at 02:19inparaenum, e.g. "This is a list: (1) fruit, (2) vegetables, (3) meat.", but where no number appears if only one item is listed. Theinparaenumpackage will not work in my case, as the numbering flows from text, into macros, and back to text, so placing it in a list environment with\beginand\endwould lead to too many problems. – Village Dec 17 '11 at 03:05