In general, The number of bound states can be derived from Bohr-Sommerfeld quantization formula: $$\oint \sqrt(W-W_p(x))~ dx= \left(n+\gamma \right) \pi \approx N \pi$$, where N is number of bound states up to Energy $W$, and $\gamma$ is called Maslov Index. For Harmonic oscillator, It is $1/2$.
For a Finite square well of width $d$, and depth $W_p$ , The number of Bound states $\color{blue}{\textrm{up to energy $W$ }}$ is given as,
$$N(W) \approx \pi^{-1} \left[\int _{-d/2}^{d/2} \sqrt(W+W_p) dx + \int _{d/2}^{-d/2} \sqrt(W+W_p) (-dx) \right ]\approx 2 \pi^{-1} \int _{-d/2}^{d/2} \sqrt(W+W_p) dx \color{\red}{ \approx \pi^{-1}\sqrt{W+W_p} ~d.} $$
$\color{blue}{\textrm{ The "TOTAL" number}}$ of Bound states can be found by setting $W$ equal to $0$ (because, the highest-lying Bound state of a potential well will be close to $0$, or very small negative number).
So "Total" number is given as:$\color{\red}{ N \approx \pi^{-1}\sqrt{W_p} ~d.}$
$\color{green}{\textrm{Numerics}}$: For the $W_p=5.$ and $d=1.$ Plot of transcendental equation (Last two equations of OP) for even and odd solutions as a function of $W$ are as,
$\color{green}{\textrm{Which gives "ONE" bound states. }}$
and, $N \approx 0.712$
Note: In general (after so- many calculations) we found a rule: the Total number of bound states for a square potential well are given as $[N]+1$, where [.] denotes the integer part} Reference.
$\color{green}{\textrm{Hence, $N$ gives "One" bound states.}}$
I have the used: $\hbar=1, 2m=1$