Er…
An interval is defined as the distance between two notes. Not three, and not four. Just two.
So if you take A and B, two notes are involved, you have a second.
If you take A and C, three notes are involved (A, B, C), so you have a third,
And so on.
If you go from A to A’ (A one octave higher) there are eight notes altogether involved (A, B, C, D, E, F, G, A’), hence an octave (= eighth).
No note is counted twice because there are only two notes defining any interval. (the note on the left and the note on the right; the name of the interval is the total number of notes involved: the start, the end and the ones in between).
Now, when you say: From A to A’ there is one octave, and from A’ to A’’ there is another octave, therefore the A’ has been counted twice, it makes no sense, because you only consider two notes, not three. It does not matter if the note you are starting from is the note you finished on. Such information is not taken into consideration when dealing with intervals, only the two notes involved.
Take the C major triad: C-E-G
From C – E you have a third. (Three notes involved: C-D-E)
From E – G you also have a third (Three notes involved: E-F-G)
And from C – G you have a fifth (Five notes involved: C-D-E-F-G)
The E has not been counted twice. Neither the C, neither the G. They only appear more than once if you look at the three sentences above together, but each sentence is a separate entity, one has nothing to do with the other. The E was the end of the first interval. It was also the start of the second interval. The C was the start of both the first and last interval, and the G was the end of both the second and the last interval. But they have not been counted twice. In each interval they were counted once only.
This is not such an outlandish concept. If you decide to travel from Oxford to London, you will have a stop in Reading. When you measure the distances between Oxford – Reading; Reading –London; did Reading got counted twice? Of course not. The distance Oxford-Reading is independent of the distance Reading-London. When you measure distances, only origin and destination count. In fact Reading will not even appear if you measure the Oxford-London distance.
I hope this helps.
Best wishes,
Bernhard.