Why are you multiplying in your total score? It should be just a simple addition. You have X ratings with a maximum of Z points possible (Z*X). The way a rating script typically runs is like so:
User chooses rating from 1 - 10.
User response is added to the total points for that item
The number of ratings received is incremented by 1
The Average is calculated (total points over votes cast)
So as an example:
30 people visit my site and give the following ratings:
8, 5, 7, 9, 2, 5, 1, 6, 2, 6, 1, 2, 6 ,1, 4, 7, 6, 1, 6, 5, 2, 5, 8, 10, 9, 3, 2, 8, 6, 10
My total ratings are: 30 (30 visitors cast a rate)
My total score is: 153
My average rating is: 153/30 = 5.1
Now, if you had 10 10s, it would look like this:
Total ratings: 10
Total score: 100
Average: 100/10 = 10
Understand?