Right off the bat, the best way to prevent your pup from mounting is to keep them on the leash. Gradually allow them to interact with other dogs this way, so you can quickly put a stop to any early signs. When your pal goes to mount, put them in a time out to enable them to calm down and to teach them this is not a welcome behavior. As time goes on, you should get to the point where you can allow your dog off the leash and simply redirect their attention when you think humping is going to happen.