The number of levels (frequency range represented) is discretionary to the user usually automatically set as to include a limited number of frequencies which is dependant on the lenght of the series and which is representative of most of the signal.

Applying a wavelet function splits the signal in two coefficients (scaling and detail coefficients) for a number of levels which represent a range of frequencies of this split defined by selecting the number of decomposition levels. Selecting the number of decomposition levels is subjective as per the frequencies you may like to extract.