Note one very important thing that has been mentioned, "he found out he had all the numbers from 0 to 956 typed in uniquely". This means that no two people said the same number. Also, since the king got 957 total replies then it means that exactly 957 people danced."
Now, let's look at the various possibilities.
Case 1: There were 0 truthtellers among these 957 people. This means that all the 957 were liars. But if this was the case, then the person saying 0 is saying the truth, which is a contradiction. So, all 957 people cannot be liars because then, the person who said 0 is telling the truth.
Case 2: There was one truthteller. This means that he would be the person who would have said 1. And all the others who danced were liars and lied. It is easy to see that this is a valid possibility. There can indeed be one truthteller and 956 liars and everything checks out.
So, we have found one valid solution namely, there was one truthteller and 956 liars who danced at the party. Could there be other valid possibilities? Let's explore further.
Case 3: There were 2 truthtellers. If this was the case then both these truthtellers would have said 2. But , there was only one person who said 2. So, this is not a possibility.
In fact, number of truthtellers cannot be >1 because if there were n truthtellers ( where n >1) then there would have been n people whose answer would have been "n".
For instance,
if there were 3 truthtellers then exactly 3 people would have said 3 and the rest, who were all liars, would have said some other number.
If there were 4 truthtellers then exactly 4 people would have said 4 and the rest, who were all liars, would have said some other number, etc.
But everybody says a unique number and no two people say the same number.
So, in a nutshell, the only possibility is that there was one truthteller and 956 liars who danced at the party.