Actually, I think that ALL of them are windows, but I'm suggesting here that they're not necessarily windows meant for people to be looking out into space. They were probably installed in the first place so scientific instruments could be placed on the inside of the hull where they could be maintained and serviced on a regular basis and still have a view of space outside the ship.
IOW, in the TOS ship, the windows probably act as sensor viewports and various scanning devices are installed behind them. It would certainly explain why we so rarely see those windows from the inside of the ship: the only places you're likely to find them are empty sensor bays where your view of the window will be obstructed by equipment anyway.
The comparison with the Ent-D you made makesa lot of sense. It also meshes with a pet theory I've had for a while about Voyager's smaller viewports - they are way shorter than the Ent-D's (and sometimes situated too low to the floor to be of any real use as viewports) but as additional sensors would be just fine.
Returning to the TOS-E, your blend of some windows as sensor ports while leaving others as observation ports is very appealing. It may even be applicable to the refit-E, where even senior officers didn't have viewports in their quarters, yet there is still a myriad of windows in the saucer and engineering section.
The only nagging complication is - why so many windows on the engineering hull compared to the saucer?