The number · Intervals · Music theory
The number is counted by the letter names of the notes, including both ends. From D to F there are three letter names (D, E, F), so it is a 3rd.…
The number
The number is counted by the letter names of the notes, including both ends. From D to F there are three letter names (D, E, F), so it is a 3rd. Accidentals do not count: D–F, D–F♯ and D♭–F♯ are all thirds.
Two identical notes form a unison; from a note to the next one with the same name there is an 8th, the octave. On the staff, 3rds, 5ths and 7ths go from line to line or space to space; 2nds, 4ths and 6ths, from line to space.
Reading them at a glance
With practice you see the number before counting it. 3rds, 5ths and 7ths have both notes of the same kind: both on lines or both in spaces. 2nds, 4ths, 6ths and octaves have one on a line and one in a space.
Distance helps tell them apart: a 3rd is two neighboring lines, a 5th leaves one line between and a 7th, two. A 2nd is written with the noteheads touching and offset, because they do not fit one above the other. This visual recognition is what makes sight-reading possible without counting note by note.