Looking for a book or article on the result linked below. The result tells us that the number of lattice points on a line between points $(a,b)$ and $(c,d)$ is given by $\gcd(a-c,b-d)+1$.


<https://math.stackexchange.com/questions/628117/how-to-count-lattice-points-on-a-line>



Source on counting lattice points on a line
This result is essentially contained in Apostol's *Introduction to Analytic Number Theory*. On page 62:



> 
> **Theorem 3.8** Two lattice points $(a, b)$ and $(m, n)$ are mutually visible if, and only if, $a - m$ and $b - n$ are relatively prime.
> 
> 
> 


The proof of the theorem contains the proof of the counting result you are after.


