"could not count to twenty-eight each month without getting into trouble"

This is an indirect, numerical way of saying Lieutenant Scheisskopf’s wife could not keep track of her own fertility cycle. Most people believe the average menstrual cycle lasts 28 days, but various studies have established a length between 28.1 and 29.1 days, often with variations of several days in either direction.

Whether Lieutenant Scheisskopf’s wife only thinks she’s perpetually pregnant or has to obtain multiple abortions is not clear from the narrative. That a “crazy mathematics major” who graduated from the prestigious Wharton School could not count to 28 is another typical Catch-22 paradox.