Suppose I make a run and encounter Ashigaru. Suppose it has at least three subroutines, and I use Grappling Hook to break all but one of them. I then trash Utopia Shard to force the corp to discard two cards from HQ, and cause Ashigaru to lose two subroutines. Then any remaining unbroken subroutines resolve. Does the run end? The gaining and losing of subroutines are tracked as a running total. So if Ashigaru has 4 subroutines, and you break 3, and then it loses 2, you have broken all subroutines on it and the run continues.