Consider the finite field extension $\mathbb{F}_{{q}^{d}}$ over $\mathbb{F}_{q}$, where $q=p^a$ for some prime $p$. We assume $d\geq 2$. Let, $$ S=\{ \alpha \in \mathbb{F}_{q^d}\hspace{0.1 cm} | \hspace{0.1 cm} \mathbb{F}_{q}(\alpha)=\mathbb{F}_{q^d} \}$$
In other words, $S$ consists of all those elements in $\mathbb{F}_{q^d}$, whose minimal polynomial over $\mathbb{F}_{q}$ has degree $d$. Let, $S^m= \{ s^m | s\in S\} $, where $m$ is a positive integer $\geq 2$. Then, $$ |S\cap S^m|=?$$
I calculated, this for $m=2$. The answer depends on whether $d$ is odd or even. We have,
$$ |S\cap S^2|= \begin{cases} \frac{|S|}{2} & if \hspace{0.2 cm} d \text{ is odd}\\ \frac{1}{2}[|S|-\frac{(q^{d/2}-1)}{d}] & if \hspace{0.2 cm} d \text{ is even} \end{cases} $$
And, $|S|=dM(d,q)$, where $M(d,q)$ denote the number of irreducible polyomials of degree $d$ over $\mathbb{F}_{q}$.
I couldn't generalize my method to $m>2$. My, idea is that this problem seems to have been well studied in the literature of finite fields. So, I am hoping for some kind of help or suitable references in this case.
Thank you!