How to draw a finite-duration sequence
The plot as shown makes sense as nothing has limited the time axis to be going from $-\infty$ to +$\infty$. So we are showing the finite duration sequence as it would appear on such a time axis.

We can limit the time axis to a finite number of samples as used in the Discrete Fourier Transform (DFT) or the an unlimited time axis as used in the Discrete Time Fourier Transform (DTFT). Neither approach would change the number of samples in a finite duration signal.

So the plot and text is implying the time axis extends from  $-\infty$ to +$\infty$. The number of samples in the finite duration sequence would be the non-zero samples.

My confusion when first answering this question was the case of the DFT and how adding zeros is significant to the result, but really this is just approximating the DTFT and not changing the duration of the sequence itself.