f(x)=ax^3+bx^2+cx+d
f(1)=a+b+c+d = 4
a+b+c+d=4
If a = 4 then b,c, and d = 0 1 possibility
If a=3 then one of b,c,d is 1 and the others are 0 3 possibility
If a=2 and one of the others is 2 3 possibility
If a=2 and two of the othes are 1 3 possibility
If a=1 and the other three are all 1 1 possibility
If a=1 and one of the others is 3 3 possibility
f a=1 and 2 of the others are 1 and 2 respectively 3!=6 possibility
Total 1+3+3+3+1+3+6 = 20
You need to check that I haven't missed any.