patternOrderLength function

Get the length of the pattern order table