There will definitely be a correlation between number of pixels and size/area, however I don't think you can use it for quantitative measurements. If the picture were to be taken from closer/further away then the number of pixels would be different for the same area.
I think it would take a lot of work to be able to make quantitative measurements.