You first need to decide how much barking you can tolerate and then train your puppy to achieve that goal. As we have stated before, you must decide what the rules are for you and your family and work during your training toward that end.
Situations often differ with regards to a barking dog. A person living in the city in an apartment does not want a dog that is constantly barking. This can be very irritating to both you and your neighbors.
Now that you have decided how much barking you want your dog to do and when, it is as simple as taking steps in your puppy training to achieve this goal. The best way to get your dog or puppy to bark only when you want is, during puppy training, teaching him to stop when on command. This is a major opportunity on clueing him in to the proper times to bark.