There's got to be a better way than what I'll document here (AppleScript maybe?), but I don't know it and this will at least give you something to get the information.
-
With a window at a desired size and frontmost, Command-Control-Shift-4.
-
Move the crosshair-style cursor over the window, press the Space bar (cursor switches to a camera), then click the mouse/trackpad on the desired window.
-
Open Preview and select File > New From Clipboard (or just press Command-N).
-
Use the Tools menu to select Adjust Size, then (if necessary) switch the pop-up menu to the right of the image dimensions to Pixels. You can now see the window size.
That gets the information, but there has got to be a more efficient way.