6. In the Cartesian coordinate system, $O$ is the origin, points $A(3, a) 、 B(3, b)$ make $\angle A O B=45^{\circ}$, where $a 、 b$ are integers, and $a>b$. Then the number of pairs $(a, b)$ that satisfy the condition is.
6.6.

Let $\angle A O X=\alpha, \angle B O X=\beta$. Then $\tan \alpha=\frac{a}{3}, \tan \beta=\frac{b}{3}$.

Given $a>b$, we have
$$
\begin{array}{l}
1=\tan 45^{\circ}=\tan (\alpha-\beta) \\
=\frac{\tan \alpha-\tan \beta}{1+\tan \alpha \cdot \tan \beta}=\frac{3(a-b)}{9+a b} .
\end{array}
$$

Rearranging gives $(a+3)(b-3)=-18$.
Since $a>b$, and both are integers, we have
$$
\begin{array}{l}
(a+3, b-3) \\
=(18,-1),(9,-2),(6,-3), \\
\quad(3,-6),(2,-9),(1,-18) .
\end{array}
$$

Therefore, there are 6 pairs of integers $(a, b)$ that satisfy the condition.