The nth term formula is that $a_n = a+(n-1)d$
How does this formula convert to the formula for the number of terms in an arithmetic sequence which is equal to $$\dfrac{\text{last term-first term}}{ \text{common difference}}+1$$
In other words, how can I prove the formula for the number of terms in an arithmetic sequence? I tried to attempt this but I don't know how to manipulate a formula with a subscript in maths.
Edit: So going on from one of the answers we have $$a_n=a+(n-1)d \Longrightarrow \frac{a_n-a}{d}+1=n$$
So I get it now.