Yes, in fact there is a way to prove it: by placing a Hard Wall at some distance L on the right. Doing so, allows to count the scattering states (as the system becomes a sort of infinite square well).
So, you will have the used-to-be scattering states that become bound states on one hand (I'll call them UTBS1) and the used-to-be bound states that remain bound states on the other hand (I'll call UTBB). That is for the case $V(x)\neq 0$.
For the case, $V(x)=0$, well it is much easier since there didn't use to be bound states (when the right hard wall wasn't here) so there is no UTBB2 (that's why UTBB1 is called UTBB without index) but on the other hand, you've got used-to-be scattering states that have become bound states (these I will call UTBS2).
In the case of $V(x)\neq 0$ you have used-to-be bound states, that means that the minimum of the potential $V_{min}$ is lower than $0$. So you can imagine that the quantized bound states (not the used-to-be) will start from a "floor" lower than the other floor $V=0$. (Let's say for example that inbetween $V_{min}$ and $V=0$ lay 7 states). As you know the states become more and more spaced out for an infinite potential well. So in the little slice of $dk$ (remember, here, $k$ is a proxy for energy $E$) there will be less states than there would be for the case $V(x)=0$. Because the states are less spaced out when $n=0,1,2$ than when $n=8,9$! Note, all of the $k$ in $dk$ have to be positive because $k$ is a proxy for energy $E$ and $E$ cannot be negative.
The idea of the proof is to substract the (infinitely many) states in UTBS2 with the (infinitely many) states in UTBS1. As you may imagine, UTBS1 is like the same as UTBS2 but truncated...
So what is left when we substract the two? UTBB is the answer.
I know the proof is well detailed in terms of maths and equations in OCW lecture notes, so you will easily catch why there is a $\pi$ that show up.