The answer is 42. When the pattern CD4H0X4(-)(-)-*) matches an atom, there are 24 possible ways for it to match (that's 4! = 4 * 3 * 2 * 1 because there are 4 places for the first *, 3 for the second, etc.).
RDKit's GetSubstructMatches by default matches at most maxMatches=1000 times.
1000/24 = 41.666...
Changing maxMatches to 2000 finds all 50 expected matches.
This means RDKit's recursive SMARTS matcher does all matches, rather than stop at first match.



