It just occured to me that the schedules I mentioned above have the property that players are exactly once on each court. As you have not asked for this, then the minimum is actually 16 players. For example, if women team members are 1 to 4, and men 5 to 8, then you could play as follows:
(A1 A5 B1 B5) (A4 A8 B4 B6) (A2 A6 B2 B7) (A3 A7 B3 B8)
(A4 A7 B2 B5) (A1 A6 B3 B6) (A3 A8 B1 B7) (A2 A5 B4 B8)
(A2 A8 B3 B5) (A3 A5 B2 B6) (A1 A7 B4 B7) (A4 A6 B1 B8)
(A3 A6 B4 B5) (A2 A7 B1 B6) (A4 A5 B3 B7) (A1 A8 B2 B8)