As described by Bulbapedia, the game tries to ensure that there will be four different Munchlax trees, so 21 choose 4 is correct (aside from implementation details).
As TCoD alludes, the game's match-checking procedure has a bug where it doesn't check if it has incremented a clashing "tree index" to an index that is already present. (For example, A=4 B=3 C=5 D=3 will set your trees to 4, 3, 5, 4 so you effectively have three trees.) But all of this is auxiliary to the answer for this question.