Constraints (like obstacles) modify the DP formula by setting certain states to 0.
Always check edge cases: blocked start or end means 0 paths.
The base case initialization must respect obstacles (you cannot propagate through a blocked cell).
These grid counting techniques appear in robotics, game design, and pathfinding algorithms. You now understand the pattern.