7. Let the function
$$
f(x)=\left\{\begin{array}{ll}
\frac{1}{p}, & x=\frac{q}{p} ; \\
0, & x \neq \frac{q}{p},
\end{array}\right.
$$

where $p$ and $q$ are coprime, and $p \geqslant 2$. Then the number of $x$ values that satisfy $x \in[0,1]$ and $f(x)>\frac{1}{5}$ is $\qquad$ .
7.5.

Obviously, $x=\frac{q}{p}$ (otherwise, $f(x)=0$). At this point, from $f(x)=\frac{1}{p}>\frac{1}{5}$, we get $p<5$, i.e., $p=2,3,4$. When $p=2$, $x=\frac{1}{2}$; when $p=3$, $x=\frac{1}{3}, \frac{2}{3}$; when $p=4$, $x=\frac{1}{4}, \frac{3}{4}$.
Therefore, there are 5 values of $x$ that satisfy the condition.