We study the cardinality of orthogonal exponential functions in \(L^{2}(\mu_{\{R,D\}})\) , where \(\mu_{\{R,D\}} \) is the self-affine measure generated by an expanding real matrix \( R = {\rm diag}[\rho_{1},\rho_{2},\dots,\rho_{n}] \) and a finite digit set \( D\subset\mathbb{Z}^{n} \) . Let \( m \) be a prime and \( \mathcal{Z}(m_{D}) \) be the set of zeros of mask polynomial \( m_{D} \) of \( D \) . Suppose \(\mathcal{Z}(m_{D})\) can be decomposed into the union of finite \(\mathcal{Z} _{i}(m),\) where \(\mathcal{Z} _{i}(m)\) satisfies \( (\mathcal{Z} _{i}(m)-\mathcal{Z} _{i}(m))\backslash\mathbb{Z}^{n}\subset\mathcal{Z} _{i}(m)\subset(m^{-1}\mathbb{Z}\backslash \mathbb{Z})^{n} \) and \( \mathcal{Z} _{i}(m)\nsubseteq(m_{1}^{-1}\mathbb{Z}\backslash \mathbb{Z})^{n} \) for all integer \( m_{1}\in(0,m) \) , then we show that \( L^{2}(\mu_{\{R,D\}})\) admits infinite orthogonal exponential functions if and only if \( \rho_{i}=(\frac{m p_{i}}{q_{i}})^{\frac{1}{r_{i}}} \) for some \( r_{i},p_{i},q_{i}\in\mathbb{N} \) with \( \gcd(p_{i},q_{i})=1 \) , \( i=1,2,\dots,n \) . Furthermore, if \( L^{2}(\mu_{\{R,D\}})\) does not admit infinite orthogonal exponential functions, we estimate the number of orthogonal exponential functions in some cases.