The Shepherd's Solution

FORTY ONE sheep in all. FIFTEEN sheep can be seen from each window.