Counting Reorders

CSES - 2421