I don’t think I understand the problem. We have n distinct integers, and the array has already been partitioned. Why isn’t the answer just that there was exactly one pivot that could generate that partition?
For [1, 2, 3, 4, 5] there are 5 pivots.
For [1, 2, 3, 5, 4] there are 3 pivots (1, 2, and 3)
For [2, 1, 3, 5, 4] there is only 1 (3).
Edit: in fact, 1 and 4 may be valid pivots too for this example, if empty subarrays are allowed (remember that we don't necessarily know A, so A = [4, 1, 2, 3] with a pivot of 4 will yield the same A' = [1, 2, 3, 4], as will A = [2, 3, 4, 1] with a pivot of 1).