5. The graph of a certain linear function is parallel to the line $y=\frac{5}{4} x+\frac{95}{4}$, and intersects the $x$-axis and $y$-axis at points $A$ and $B$, respectively, and passes through the point $(-1,-25)$. Then, on the line segment $AB$ (including $A$ and $B$), the number of points with both integer coordinates is ( ) .
(A) 4
(B) 5
(C) 6
(D) 7
5. B.

Let $y=\frac{5}{4} x+b$.
From $-25=\frac{5}{4} \times(-1)+b$, we get $b=-\frac{95}{4}$.
Therefore, $y=\frac{5}{4} x-\frac{95}{4}$.
Thus, $A(19,0)$ and $B\left(0,-\frac{95}{4}\right)$.
From $y=\frac{5(x-19)}{4}, 0 \leqslant x \leqslant 19$, taking $x=3,7$,
$11,15,19$, $y$ is an integer.
Therefore, on the line segment $A B$ (including $A$ and $B$), there are 5 points where both the x-coordinate and y-coordinate are integers.