# Resetting newtheorem counter

This one is probably straightforward, but I'm not missing something with the newtheorem environment and using newcounter. I would like a new environment on its own counter like "Environment M.1", but I get "Environment M.0.1" in the following.

\documentclass{article}

\newcounter{mycounter}
\renewcommand{\themycounter}{M.\arabic{mycounter}}
\newtheorem{myenv}{Environment}[mycounter]

\begin{document}

\begin{myenv}[Some Stuff]
\end{myenv}

\end{document}
-

You don't need to define a new counter -- \newtheorem{myenv} already creates the necessary counter myenv. Just redefine \themyenv.

\documentclass{article}

\newtheorem{myenv}{Environment}
\renewcommand*{\themyenv}{M.\arabic{myenv}}

\begin{document}

\begin{myenv}[Some Stuff]