Barrels Of Balsam

A merchant of Bagdad had ten barrels of precious balsam for sale. 
They were numbered, and were arranged in two rows, one on top of the other, as shown in the picture. 
The smaller the number on the barrel, the greater was its value. 
So that the best quality was numbered "1" and the worst numbered "10," and all the other numbers of graduating values. 
Now, the rule of Ahmed Assan, the merchant, was that he never put a barrel either beneath or to the right of one of less value. 
The arrangement shown is, of course, the simplest way of complying with this condition. 

But there are many other ways such, for example, as this:

1 2 5 7 8
3 4 6 9 10

Here, again, no barrel has a smaller number than itself on its right or beneath it. 
The puzzle is to discover in how many different ways the merchant of Bagdad might have arranged his barrels in the two rows without breaking his rule. 
Can you count the number of ways?

See answer

Math Genius