In the comments you confirmed that you gather the authors of your document in the standard way. In this case you could use delimited arguments to get the actual number of authors (as a direct answer to your question):
\newcounter{authors}
\stepcounter{authors}
\def\count@and#1\and#2{%
\ifx#2\@nil\else
\stepcounter{authors}\expandafter\count@and\fi
}
Now, if you use \count@and...\and...\and...\and\@nil, \theauthors will hold the number of elements seperated by \and. You can include this to count the authors defined by \author with the following patch.
\let\latex@author\author
\def\author#1{%
\count@and#1\and\@nil
\latex@author{#1}
}
In a similar fashion to @egreg's answer you could say:
\xpatchcmd{\@maketitle}
{\begin{tabular}}
{\author@or@authors\begin{tabular}}
{}{}
\def\author@or@authors{\textit{Author\ifnum\theauthors>1s\fi:}\\}
And here is the complete code:
\documentclass{article}
\usepackage{xpatch}
\makeatletter
\newcounter{authors}
\stepcounter{authors}
\def\count@and#1\and#2{%
\ifx#2\@nil\else
\stepcounter{authors}\expandafter\count@and\fi
}
\let\latex@author\author
\def\author#1{%
\count@and#1\and\@nil
\latex@author{#1}
}
\xpatchcmd{\@maketitle}
{\begin{tabular}}
{\author@or@authors\begin{tabular}}
{}{}
\def\author@or@authors{\textit{Author\ifnum\theauthors>1s\fi:}\\}
\makeatother
\title{title}
\author{John Doe}%\and Jane Doe}
\begin{document}
\maketitle\theauthors
\end{document}
\@author– egreg Sep 12 '17 at 16:24\author{John Doe \and Jane Doe}– Sam Sep 12 '17 at 16:25\authorscommand which you use when there are several authors? – Bernard Sep 13 '17 at 15:42.styfiles that should be used by multiple students, so I don't want to add too much commands myself. The default\authormacro accepts multiple authors and is also widely used, so I'd like to keep this command to make the usage of this template simple and only redefine how it is printed. – Sam Sep 13 '17 at 15:47