George the bulgarian goatherd drives his father's goats into a valley each morning and lets them browse there all day before driving them home in the evening.

he notices that each morning the goats immediately separate into groups and begin to feed the number and sizes of the initial groups vary some days there are nine and so days there are three or fewer. there can be groups of one or the whole group.

about every five minites one goat breaks away from each feeding group and these breakaway goats form into a new group.

George has noticed that by the afternoon, even though the goats continue their regrouping the sizes of the groups have stabilised, and there is always seven feeding groups.

How many goats are there in the herd? What are the sizes of the feeding groups once they have stabilised?