5. Using the numbers $0,1,3,5,7$, any different numbers can be used as the coefficients of a quadratic equation, (1) how many different quadratic equations can be formed? (2) How many of these equations have real roots?
5. (1) $\mathrm{P}_{5}^{3}-\mathrm{P}_{4}^{2}=48$.
(2) The condition for the equation to have real roots is $b^{2}-4 a c \geqslant 0$,
when $c=0$, $a, b$ can be any 2 of $1,3,5,7$, there are $\mathrm{P}_{4}^{2}=12$ ways; when $c \neq 0$, $b^{2} \geqslant 4 a c \geqslant 12$, so $b$ can be 5 or 7; when $b=5$, $a c \leqslant \frac{25}{4}$, $a, c$ can be 1,3 in two ways; when $b=7$, $a c \leqslant \frac{49}{4}$, $a, c$ can be 1,3 or 1,5, in four ways. In total, there are $12+2+4=18$ ways.