Intervals differ by a) the number of scale's steps inside,

the number of whole tones (halftones) inside; a) determines the names of intervals as "second', third', or 'fifth';

determines the size of interval, e.g. whether this second/fifth is great or small/perfect, diminished or augmented.
The enharmonic 'renaming' of given sound (fron B to C flat) changes the name of interval (fourth instead of fifth), not the actual 'size' (2 and a half tones). If you (or composer) shoose to hame given compbination of sound as B - F flat , it will be double-diminished fifth; if C Flat - F flat - perfect fourth. This choise is dictated by the tonal background of given sounds' combination; if you are in A Flat Major, the interval in question MUST be notated as B natural (IV+) and F flat (VI-); there is no place in A flat MAJOR for C flat! Therefore, you are dealing with double-diminished fifth as the part of the chord of altered subdominant (second seventhschord with root+, 3+, 5-).
Bytheway, this chord, and, therefore double-diminished fifth are VERY NATURAL for classical music. Check, for example, such a pop hit as slow movement from Beethoven's Fifth Symphony: d-diminished fifth helped the enharmonic modulation from C Major into A flat Major (because, d-diminished fifth is enharmonically equal to perfet fourth). Anothr example: enharminc modulation in the middle section of Chopin's Notturno C# Minor
Best regards