nlayers,list-method: Find the number of layers in a Spatial Object
Description
There are already methods for Raster* in the raster package.
Adding methods for list, SpatialPolygons, SpatialLines,
and SpatialPoints, gg, histogram, igraph.
These latter classes return 1.