Mazda says it needs 3.70 ~ 5.18 quarts with filter cartridge replacement. But for drain-and-fill only, people usually use about 3.75 quarts.
Mazda Genuine ATF-FZ, part no. 0000-FZ-113E-01 (MSRP $15.65)
ATF drain plug washer, part no. 9956-41-400
A single D&F gives you about 50% fresh ATF. 2 D&F’s give you about 75%; 3 D&F’s give you about 87.5% fresh ATF. Most people do 3 D&F’s if they prefer doing it multiple times. And they do it with 1 ~ 2 weeks interval in between.
If you plan to drop the pan and change the ATF filter cartridge, here’re 2 excellent write-ups by Digbicks1234 and PatrickGSR94:
2016.5 CX-5 Transmission fluid change questions
2014 CX5 Tune-Up items to replace?
As for gear lubricant change on front transfer case and rear differential, you need 0.48 quart
Mazda Long Life Hypoid Gear Oil SG1, part no. 0000-77-SG1-QT (MSRP $30.85!), for transfer case; ~0.70 quart SG1 for rear differential. Don’t get fooled by owner’s manual which lists 0.48 quart for the rear differential, and just buy 1 quart SG1 to cover both changes. You need 2 bottles.
Here’s an excellent write-up by CX5-SO:
Rear Diff and Transfer Case Fluid Change: Tools, Parts and Links