You want wire the engine battery to the #1 position on the Perko, and the amps batteries to the #2 on the perko. When the Perko is set to the number 1 position, that is what wil be powering everythig, so that is what you want when starting your boat, and that is what will be getting charged. Running in the all position, both battery banks will be powering everything, and is a good position for the Perko while running, as the alternator will be charging everything. When you set the Perko to the 2 position, your stereo batteries will be powering whatever is on, and is a good position for the Perko, as you will not be running down your starting battery, and will always be able to start the boat.
Depending what size alternator, what size stereo your powering, and how much your running vs. sitting, the alternator probably won't be able to keep all batteries at a full charge, so I suggest plugging your batteries into a charger at the end of the day, and keeping everything topped off. Batteries stored in a less then full state of charge, will shorten their life considerably.