Counting Sheep solutions

Counting Sheep was solved using PL/SQL by 2 contestants.