There's a cool mental calculation hack I recently learned for this: If you open the calendar app on your phone or computer, the highest-numbered box along the bottom is equal to the number of days in the month!
Special 10th anniversary edition of WHAT IF?—revised and annotated with brand-new illustrations and answers to important questions you never thought to ask—coming from November 2024. Preorder here!