Honestly, either way will work fine, but if you're short on space, you can share inputs. You may want to have 7 separate inputs if you're emulating any consoles that have full gamepads full of buttons (e.g. SNES has 6 buttons, a start and a select = 8 buttons). Otherwise, yeah, make A and G one input.
The flipper buttons I'd share with main inputs though - since you can't really do much else with them anyhow.