just make a tree
All the numbers are valid first numbers so write them down on a page with some space between them.
Then start listing valid numbers for each below them.
For example 3, 4, 5 are all valid following a 1
Just continue that for 4 rows. You'll also use the fact that codes must have distinct numbers to trim branches as you go.
At the bottom you'll have the leaves from the survivors. Count them. There are 20.