Before Danny putts, Rodney Dangerfield's character (Czervik?) says to the Judge "Double or nothing he makes this putt." At that point the score is irrelevant. If Danny misses it, they lose.
They could have been playing match play. After 15 holes the Judge's team could have been up 8 holes to 7. The teams tie the 16th and 17th, which would make the 18th hole worth 3. If Danny misses his putt, they tie the last hole and the Judge wins 8 - 7. If Danny makes it, he and Tie win 10 - 8.
rmceu1 is right. Since the match would have gone to a play off if Danny made the putt. Al yells to Smails double or nothing that he'd make the putt. Thus making the final bid $160,000 per team.
You can't just count the number of putts. You don't know how many strokes it took them to get to the green... However, the strokes should go from win, tie, to loose. The exception is the last bet Chevy made, that the last putt is made.