Three things to remember:
Combinations vs permutations is controlled by loop order. Coins . Amount . This is the most common bug in counting DP.
Forward vs backward inner loop depends on bounded vs unbounded. Bounded (use each item once) needs backward. Unbounded (unlimited use) can go forward.
Base case for counting is , not 0. There's exactly one way to make sum 0: use nothing.