number of bands

I have modifed the code to return the number of bands of an image. Sometimes is very usefull in multiband images.