Think like this:
Imagine three different d4's - one blue, one green, one red. Each can show four different numbers, which means that the total number of unique results is 64 (4*4*4). How many of those 64 gives the sum of 3? Only one. How many gives the sum of 4? That's three (1 1 2, 1 2 1, and 2...