The best way to determine the balls of yarn is to check the yardage (meterage). If one yarn calls for 10 balls and has 125 yards on it then it is 1250 yards that you need.
10 balls x 125 yards = 1250 yards
New yarn - has 145 yards on it (must be the same tension yarn but sometimes the different makeup of the yarn will give you different yardage)
1250 yards / 145 yards = approximately 9 balls
Always round up the number of balls that you need. Even if it is 50 yards difference. It is awful to be three quarters of the way through a project and then run of yarn! Guaranteed that the dye lot is not available.
I hope this helps.