For simple cases like this it doesn't even cost a couple lines as sum() can take a generator expression:
sum(planet['moons'] for planet in target['system']['planets']) sum(planet['moons'] for planet in target['system']['planets']) sum(planet.get('moons', 0) for planet in target['system']['planets'])