Counting Sheep solutions

Counting Sheep was solved using XQuery by 1 contestant.