I have reformed a command from this answer. It auto-generates numbers for specific lines. Please see this code.
\documentclass{article}
\usepackage{lipsum}
\newcounter{mynumber}
\newcommand{\myno}[1][1]{\hfill\refstepcounter{mynumber}(\arabic{mynumber})\label{#1}}
\def\NewLLLLLast{\texttt{[\the\numexpr\value{mynumber}-4\relax]}\space}
\def\NewLLLLast{\texttt{[\the\numexpr\value{mynumber}-3\relax]}\space}
\def\NewLLLast{\texttt{[\the\numexpr\value{mynumber}-2\relax]}\space}
\def\NewLLast{\texttt{[\the\numexpr\value{mynumber}-1\relax]}\space}
\def\NewLast{\texttt{[\the\value{mynumber}]}\space}
\begin{document}
\lipsum[1] \myno\\
\lipsum[1] \myno[second]\\
\lipsum[1] \myno\\
\lipsum[1] \myno\\
\NewLLLLast is the first paragraph.\\
\NewLLLast is the second paragraph.\\
\NewLLast is the third paragraph.\\
\NewLast is the fourth paragraph.\\
In \ref{second} paragraph bla bla bla.
\end{document}
Now I want a command which restarts this numbering from 1. Let's say the command is \restartnum. Whenever I put it, the next \myno should generate (1).

\setcounter{mynumber}{0}? – leandriis Oct 05 '19 at 12:57