A new recursive function on discrete interval exchange transformation associated to a composition of length r, and the permutation σ(i)=r−i+1 is defined. Acting on composition c, this recursive function counts the number of orbits of the discrete interval exchange transformation associated to the composition c. Moreover, minimal discrete interval exchanges transformation i.e. the ones having only one orbit, are reduced to the composition which label the root of the Raney tree. Therefore, we describe a generalization of the Raney tree using our recursive function.