I did a little search work on this problem, and it seems that I found the following article.
\\

[The Lefschetz trace formula for algebraic stacks][1]
\\

The result is that: If $\mathcal{X}$ is an algebraic stack, the we will have a same Lefschetz trace formula for $\mathcal{X}$, but it would not always be a finite sum. But if it is Deligne-Mumford, then it is known that it is a finite sum, so we do have the rationality of its zeta-function.



  [1]: https://link.springer.com/article/10.1007/BF01232427