Suppose that $n+m$ balls of which $n$ are red and $m$ are blue, are arranged in a linear order, we know there are $(n+m)!$ possible orderings. If all red balls are alike and all blue ball are alike, we know there are $\frac{(n+m)!}{n!m!}$ possible orderings.

For example, 2 red and 3 blue balls:

R1 R2 B1 B2 B3

R2 R1 B2 B3 B1

The above two orderings are equivalent and can be denoted as:

R R B B B

Now here is the problem: what if we further concentrate on the color, and record consecutive balls of the same color with the just ONE color code?

For example the color code for the afore-mentioned example would be:

R B

How many possible color code orderings are there?