168 Undead
You will need:
A level 20 sorcerer able to cast Animate Dead.
A Ring of Spell Storing.
Someone other than you who can cast Animate Dead.
Animate Dead raises 2×(spell level)-5 or maintains control over 2×(spell level)-2 undead. We would have problem where we are forced to use a whole spell slot to maintain control over a single zombie because if we create another one instead, we lose control over the old one. By using Ring of Spell Storing with our helper we won't have a problem of growing our horde, so we can concentrate on controlling it.
Using all available spell slots per day we will be able to control:
3rd level: 3×4 = 12 undead
4th level: 3×6 = 18 undead
5th level: 3×8 = 24 undead
6th level: 2×10 = 20 undead
7th level: 2×12 = 24 undead
8th level: 1×14 = 14 undead
9th level: 1×16 = 16 undead
For total of 128 zombies or skeletons.
.
That. Was. Amazing
Still you summon 168 CR4 creatures but It would be great if you want to become the new necrolord of Firewine bridge

(or if you wanna make a Walking Dead 5e)