Texture files: Number, dimensions and number of figures / nodes using in a scene

I've been trawling the forums trying to find out if there are tools that will tell me the number of textures used in a scene, the size of each texture and the number of nodes using any texture. To help me optimise. All I've found is 3dlight's "optimizing" call at the start of a render - at which point it is a bit late.
Any ideas??
Lx
Comments
You'd probably need to get all nodes with geometry, then get the objects, then get the materials, then go through the proeprties on those getting the maps (and checking for uniqueness)
Thanks for the process suggestion Richard. 3Dlight must do all of that so wouldn't it be great if we could capture that code and put it somewhere to interrogate. Cheers, Lx