Where do the balls go if they miss? Like in bowling, do they go in the gutter and ultimately roll to the back?
Maybe add the ones that make it into the hole with the ones that go in the gutter.
If hole+gutter = 10
then run your win/lose script
That's my suggestion.