How many defects in this setup?

Not much, just issues concerning; grounding, bonding, bushings, box connectors, splices, panel installation, possible access issues, branch identification,GFCI and ARCI, and I wouldn’t be surprised to see improper breaker amp rating application by looking at the rest. It looks quite correctable, by a qualified person this time. I see a very common NEC error not in the above which I wonder if it will be picked up. I don’t see a lot of plusses with this, at least common trip seems to be OK by the pics in the right panel but not in the left panel. This may be moot point depending on conductor application which cannot be seen from a picture.

FUBAR and immediate safety hazard refer to qualified electrician ASAP.