2D wave row and column output

I want to create a row and column variable (from an image) in a function (specifically how many rows and how many columns). I've checked wavestats and waveinfo, but neither one seems to contain that information. Where can I find it?

Thanks,

Clayton