A musical interval's number name counts how many letter classes separate two notes
Western music uses seven letter classes (A B C D E F G). An interval’s number name counts how many letter classes span from the lower to the upper note, inclusive. C to D is a second (two letter classes), C to E is a third (three), C to G is a fifth (five), and so on. The number name is independent of any sharps or flats on either note: C to D-sharp is still a second because both notes share the same letter-class pair. This letter-class counting gives every interval its number before any quality (major/minor/perfect) is added.
Examples
A to B = second; B to C = second (both are seconds regardless of size). C to G = fifth; the distance in semitones may vary but the number stays fifth as long as the letter classes are C and G.
Assessment
Without counting semitones, determine whether the following are seconds or thirds: C to E-flat; D to F-sharp; G to A. Explain your reasoning using letter classes only.