You need the daily quest, Lost Lambs, to be able to collect the Lost Lambs. When you gather a lamb you get an effect with a 5 minute timer. Each lamb you collect extends the timer to the full 5 minutes. When you enter the barn with all 10 sheep you will receive A Magic Sheep Dropping.
The first time you do this you will also complete the achievement, Playing Sheep Dog.