Given two strings `a` and `b`, return the length of their longest common subsequence: the longest sequence of characters appearing left-to-right (not necessarily contiguously) in both.