refactored countSundays()