The unison is an interval of zero notes, the second an interval of one note, etc...
What I find interesting is that we double-count the end notes in a diatonic scale, but we don't double-count them in a chromatic scale. No one says there are 13 notes per octave in a chromatic scale, it's 12.
... well, up to the thirteenth, at least... I suppose one could continue to name diatonic intervals above that for really convoluted chords.
Without the off-by one error, one could do interval arithmetics in a way that intuitively makes sense... It's really weird such a bad convention caught on to begin with.
Edit: going down the rabbit hole... It looks like the off-by-one error for diatonic intervals goes back to the greek antiquity. The Romans named the fourth and fifth diatessaon and diapente, which have greek roots, but their chromatic intervals start a zero (tonus, ditonus, tritonus which gave the (semi-)tone and the tritone). The "semi" prefix means "subtract half a tone", not divide by two... https://en.wikipedia.org/wiki/Interval_(music)#Latin_nomencl...
Neither the Greeks nor the Romans had a concept of zero, so it starts to make sense as to why we started with a crooked convention. Inertia and habbit made it stick around.
There's another rabbit hole for microtonal interval names... https://en.wikipedia.org/wiki/List_of_pitch_intervals#List
Or modes: ionian, dorian, phyrgian, lydian, mixolydian, aeolian, locrian.
Nonsense.
Everyone knows it’s "si"!
Edit, also B is also sometimes notated as H. In that case B means what is usually Bb.
Edit 2: also, I just discovered that Eb was sometimes called S. What a mess :-)