The answer is two (2)
There are only two melodic ideas.
The real composer of The Talking Sheep may be Alfonso X (el Sabio). He was called the Wise in his era and was the king Castile and Leon in 1252. The composer of the talking sheep was not really proven to be Alfonso el Sabio for there are also claims that the composer is still anonymous,