The version in Pitrè (No. 97) is much better. It is called:
XCII. THE THOUGHTLESS ABBOT.
THERE was once in a city a priest who became an abbot, and who had his carriages, horses, grooms, steward, secretary, valet, and many other persons on account of the wealth that he had. This abbot thought only of eating, drinking, and sleeping. All the priests and laymen were jealous of him, and called him the "Thoughtless Abbot."
One day the king happened to pass that way, and stopped, and all the abbot's enemies went to him straightway, and accused the abbot, saying: "Your Majesty, in this town there is a person happier than you, very rich, and lacking nothing in the world, and he is called the 'Thoughtless Abbot.'"
After reflection the king said to the accusers: "Gentlemen, depart in peace, for I will soon make this abbot think." The king sent directly for the abbot, who had his carriage made ready, and went to the king in his coach and four. The king received him kindly, made him sit at his side, and talked about various things with him. Finally he asked him why they called him the "Thoughtless Abbot," and he replied that it was because he was free from care, and that his servants attended to his interests.
Then the king said: "Well, then, Sir Abbot, since you have nothing to do, do me the favor to count all the stars in the sky, and this within three days and three nights; otherwise you will surely be beheaded." The poor "Thoughtless Abbot" on hearing these words began to tremble like a leaf, and taking leave of the king, returned home, in mortal fear for his neck.
When meal-time came, he could not eat on account of his great anxiety, and went at once out on the terrace to look at the sky, but the poor man could not see a single star. When it grew dark, and the stars came out, the poor abbot began to count them and write it down. But it grew dark and light again, without the abbot succeeding in his task. The cook, the steward, the secretaries, the grooms, the coachmen, and all the persons in the house became thoughtful when they saw that their master did not eat or drink, and always watched the sky. Not knowing what else to think, they believed that he had gone mad. To make the matter short, the three days passed without the abbot counting the stars, and the poor man did not know how to present himself to the king, for he was sure he would behead him. Finally, the last day, an old and trusty servant begged him so long, that he told him the whole matter, and said: "I have not been able to count the stars, and the king will cut my head off this morning." When the servant had heard all, he said: "Do not fear, leave it to me; I will settle everything."
He went and bought a large ox-hide, stretched it on the ground, and cut off a piece of the tail, half an ear, and a small piece out of the side, and then said to the abbot: "Now let us go to the king; and when he asks your excellency how many stars there are in heaven, your excellency will call me; I will stretch the hide on the ground, and your excellency will say: 'The stars in heaven are as many as the hairs on this hide; and as there are more hairs than stars, I have been obliged to cut off part of the hide.'"
After the abbot had heard him, he felt relieved, ordered his carriage, and took his servant to the king. When the king saw the abbot, he saluted him, and then said: "Have you fulfilled my command?" "Yes, your Majesty," answered the abbot, "the stars are all counted."
"Then tell me how many they are." The abbot called his servant, who brought the hide, and spread it on the ground, while the king, not knowing how the matter was going to end, continued his questioning.
When the servant had stretched out the hide, the abbot said to the king: "Your Majesty, during these three days I have gone mad counting the stars, and they are all counted." "In short, how many are they?" "Your Majesty, the stars are as many as the hairs of this hide, and those that were in excess, I have had to cut off, and they are so many hundreds of millions; and if you don't believe me, have them counted, for I have brought you the proof."
Then the king remained with his mouth open, and had nothing to answer; he only said: "Go and live as long as Noah, without thoughts, for your mind is enough for you;" and so speaking, he dismissed him, thanking him, and remaining henceforth his best friend.
The abbot returned home with his servant, delighted and rejoicing. He thanked his servant, made him his steward and intimate friend, and gave him more than an ounce of money a day to live on. 
* * * * *
In another Sicilian version referred to by Pitrè, vol. IV., p. 437, the Pope, instead of the king, wishes to know from the abbot: "What is the distance from heaven to earth; what God is doing in heaven; what the Pope is thinking of." The cook, disguised as the abbot, answers: "As long as this ball of thread. Rewarding the good, and punishing the wicked. He thinks he is speaking with the abbot, and on the contrary, is talking to the cook."