How weekday counts are calculated
A common year has 365 days = 52 weeks + 1 day. This means one day of the week occurs 53 times and the other six occur 52 times. The day that occurs 53 times is whichever day 1 January falls on. For example, if 1 January is a Tuesday, then Tuesdays occur 53 times and every other day occurs 52 times.
A leap year has 366 days = 52 weeks + 2 days, so two days of the week occur 53 times: whichever day 1 January falls on, and the following day. The exact counts for each day are determined by iterating through all 365 or 366 days, but the shortcut above allows instant calculation without iteration.
Days of the most frequent weekday = 53; all others = 52 (common year)
The extra day is the day of the week on which 1 January falls.
Weekdays (Mon–Fri) = count of all Mon + Tue + Wed + Thu + Fri occurrences
Typically 260 or 261 in a common year; 261 or 262 in a leap year.