8. Positive integers $x$ not exceeding 1000, such that the sum of the digits of both $x$ and $x+1$ are odd. Then the number of positive integers $x$ that satisfy the condition is $\qquad$.
8.46.

Obviously, $x \neq 1000$.
Let $x=\overline{a b c}$, where $a, b, c \in\{0,1, \cdots, 9\}$, and not all are zero. $S(x)=a+b+c$ is the sum of the digits of $x$.
(1) If $c \neq 9$, then
$$
\begin{array}{l}
S(x)=a+b+c, \\
S(x+1)=a+b+c+1 ;
\end{array}
$$
(2) If $c=9, b \neq 9$, then
$$
S(x)=a+b+9, S(x+1)=a+b+1 \text {; }
$$
(3) If $b=c=9, a \neq 9$, then
$$
S(x)=a+18, S(x+1)=a+1 \text {; }
$$
(4) If $a=b=c=9$, then
$$
S(x)=27, S(x+1)=1 \text {. }
$$

From this, we can see that $S(x)$ and $S(x+1)$ are both odd only in cases (2) and (4).

In case (2), $a+b$ is even, so $a$ and $b$ are of the same parity. This results in 45 $x$ values that satisfy the condition.

In case (4), only one $x=999$ satisfies the condition.
In total, there are 46 $x$ values that satisfy the condition.