By counting the number of notes in an interval we obtain its numerical size. The first and last note must be counted. For example, from C to E we have a third (C-1, D-2, E-3). In the next figure you can see the relationship between the number of notes and the numerical size of intervals:
See Intervals in the Tutorial section.