Well no amount of either coin type can equal any amount made by the other type of coin (had there been 5 dimes you would either count 5 dimes or 2 quarters but not both because they equal the same amount).
So 3 quarters can be used 4 ways: 0Q, 1Q, 2Q, or 3Q.
Similarly, 4 dimes can be used 5 ways: 0D, 1D, 2D, 3D, or 4D.
So 4x5 = 20. But since we don't want 0Q + 0D, we really only have 19.