how to add page number latex code example
Example: add page number in overleaf
\documentclass{article}
\usepackage{lastpage}
\usepackage{fancyhdr}
\fancyfoot[C]{Page \thepage\ of \pageref{LastPage}}
% Uncomment to remove the header rule
% \renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
\begin{document}
some dummy text
\end{document}