\text{Let the functions be defined as follows:}\ f(x) = a^x,\ g(x) = \log_a x.\text{Discuss the number of intersection points between } f(x)\text{ and }g(x)\text{ in the same coordinate system.}\text{Let }f(x)=g(x) \Rightarrow a^x=\log_a x,\text{That is, the number of real roots of } \ln a^x=\ln \left(\frac{\ln x}{\ln a}\right).\text{Let } h(x)=x\ln a-\ln \left(\frac{\ln x}{\ln a}\right).h'(x)=\ln a-\frac{1}{x \ln x},\ h''(x)=\frac{1+\ln x}{(x\ln x)^2}\text{Discuss under sections }\begin{cases} x>1\\a>1\end{cases}\text{ and }\begin{cases} 0<x<1\\0<a<1\end{cases}.\mathbf{I.}\quad\text{When } x>1\text{ and } a>1,\ h''(x)>0,\ h'(x)\text{ is monotonically increasing on }(1,+\infty).\lim\limits_{x\to1^+}h'(x)=-\infty,\ \lim\limits_{x\to +\infty}h'(x)=\ln a>0.\text{So there exist exaxtly one }x_0\in(1,+\infty)\text{ so that }h'(x_0)=0,\ \text{that is, }\ln a=\frac{1}{x_0\ln x_0}.\text{So when }x\in (1,x_0),\ h'(x)<0,\ h(x)\text{ is monotonically decreasing; }x\in (x_0,+\infty),\ h'(x)>0,\ h(x)\text{ is monotonically increasing.}h(x)_{\min}=h(x_0)=x_0\ln a-\ln \left(\frac{\ln x_0}{\ln a}\right)=\frac{1}{\ln x_0}-\ln (x_0 \ln^2x_0),\ x_0 >1.\text{Let }\phi(x)=\frac{1}{\ln x}-\ln(x\ln^2x),x>1,\text{It can be proved that }\phi(x) \text{ is monotonically decreasing and }\phi(e)=0.1\degree\quad \text{When }h(x)_{\min}=\phi(x_0)>0,\text{ that is } 1<x_0<e,\ h(x)\text{ has no real roots;}\ln a=\frac{1}{x_0\ln x_0}\in(\frac1e,+\infty)\Rightarrow a\in(e^{\frac1e},+\infty).2\degree\quad \text{When }h(x)_{\min}=\phi(x_0)=0,\text{ that is } x_0=e,a=e^{\frac1e},\ h(x)\text{ a uniquely determined real root }x=e.3\degree\quad \text{When }h(x)_{\min}=\phi(x_0)<0,\text{ that is } x_0>e,a\in(1,e^{\frac1e}),\lim\limits_{x\to1^+}h'(x)=+\infty,\ \lim\limits_{x\to +\infty}h'(x)=+\infty.\text{Then there must exist } x_1\in(1,x_0),x_2\in(x_0,+\infty)\text{ such that }h(x_1)=h(x_2)=0.\text{So }h(x) \text{ has 2 different real roots}.\mathtt{Isomorphic\ processing}a^x \ln a=\ln x \Leftrightarrow a^x \ln a^x=x\ln x\text{Let }\mu(x)=x\ln x,x>1,\text{ because } a,x>1,\text{ so }a^x>1, \mu(x)\text{ is monotonically increasing in }(1,+\infty).\mu(a^x)=\mu(x) \Rightarrow \ln a=\frac{\ln x}{x}.1\degree\quad \text{When }\ln a>\frac1e,\text{ that is }a>e^{\frac1e},\ h(x)\text{ has no real roots;}2\degree\quad \text{When }\ln a=\frac1e,\text{ that is }a=e^{\frac1e},\ h(x)\text{ has a unique real root;}3\degree\quad \text{When }0<\ln a<\frac1e,\text{ that is }1<a<e^{\frac1e},\ h(x)\text{ has 2 different real roots;}\mathbf{II.}\quad \text{When } 0<x<1\text{ and } 0<a<1,\ h''(x)<0\text{ if } x\in(0,\frac1e),\ h''(x)>0\text{ if } x\in(\frac1e,+\infty),\text{So }h'(x)\text{ is monotonically decreasing on }(0,\frac1e)\text{ and increasing on }(\frac1e,+\infty).\lim\limits_{x\to0^+}h'(x)=-\infty,\ \lim\limits_{x\to 1^-}h'(x)=+\infty.1\degree\quad \text{If }h'(x)_{\min}=h'(\frac1e)=\ln a+e\geq 0,\text{ that is }a\in[e^{-e},1),\ h(x)\text{ is monotonically increasing.}\text{So there exist exactly one }x_0\in(0,1)\text{ so that }h(x)=0.\text{So } h(x)=0\text{ has a unique solution}.2\degree\quad \text{If }h'(x)_{\min}=h'(\frac1e)=\ln a+e<0,\text{ that is }a\in (0,e^{-e}),\text{ there is exist }x_1\in(0,\frac1e),\ x_2\in(\frac1e,1)\text{ so that }h'(x_1)=h'(x_2)=0.\text{So }h(x) \text{ is monotonically increasing on }(0,x_1),(x_2,1),\text{ decreasing on }(x_1,x_2).\max_{x\in(0,1)}h(x)=h(x_1)=\frac{1}{\ln x_1}-\ln(x_1\ln^2x_1),\min_{x\in(0,1)}h(x)=h(x_2)=\frac{1}{\ln x_2}-\ln(x_2\ln^2x_2),\text{Let }\phi(x)=\frac{1}{\ln x}-\ln(x\ln^2x),x\in(0,1).\phi(x) \text{ is monotonically decreasing on its domain and }\phi(\frac1e)=0.0<x_1<\frac1e\Rightarrow \max_{x\in(0,1)}h(x)=h(x_1)=\phi(x_1)>\phi(\frac1e)=0;\frac1e<x_2<1\Rightarrow \min_{x\in(0,1)}h(x)=h(x_2)=\phi(x_2)<\phi(\frac1e)=0;\text{According to }\mathtt{The\ Zero\ Existence\ Theorem},\text{There exist }t_1\in(0,x_1),t_2\in(x_1,x_2),t_3\in(x_2,1)\text{ such that }h(t_1)=h(t_2)=h(t_3)=0.\text{So, }h(x) \text{ has exactly 3 real roots.}
\begin{cases}
a\in(0,e^{-e})\\
a\in[e^{-e},1)\\
a\in(1,e^\frac1e)\\
a=e^\frac1e\\
a\in(e^\frac1e,+\infty)
\end{cases},f(x)\text{ and } g(x)\text{ have }}
\begin{cases}
3\\
1\\
2\\
1\\
0
\end{cases}\quad\text{intersection(s).}