Does the order of a differential equation necessarily equal the number of arbitrary constants in the general solution?
Your differential equation is effectively two differential equations: $y' = -1$ and $y' = 2$. Each has its own general solution with one arbitrary constant: $y = -x + c$ for the first, $y =2x+c$ for the second. The rule that the number of arbitrary constants is equal to the order applies to differential equations where $y^{(n)}$ is expressed as a function of $x, y, y', \ldots, y^{(n-1)}$.