Make intervalos function and add coments

Function intervalos - Calculate classes number.