The first digit must be \( \geq 5 \) to ensure the number is greater than 50000. This restricts the first digit to 5, 6, or 7.
For each valid first digit \( d_1 \) (5, 6, or 7), determine possible last digits \( d_5 \) such that their sum \( d_1 + d_5 \leq 8 \):
\[ \begin{aligned} \text{For } d_1 = 5: & \quad \text{Possible } d_5 \text{ are } 0, 1, 2, 3 \quad \text{(4 choices)} \\ \text{For } d_1 = 6: & \quad \text{Possible } d_5 \text{ are } 0, 1, 2 \quad \text{(3 choices)} \\ \text{For } d_1 = 7: & \quad \text{Possible } d_5 \text{ are } 0, 1 \quad \text{(2 choices)} \end{aligned} \]Each of the middle three digits (\(d_2, d_3, d_4\)) can be any of the 8 digits (0-7). Calculating the combinations for each case:
\[ \begin{aligned} \text{For } d_1 = 5: & \quad 4 \times 8^3 = 2048 \\ \text{For } d_1 = 6: & \quad 3 \times 8^3 = 1536 \\ \text{For } d_1 = 7: & \quad 2 \times 8^3 = 1024 \end{aligned} \]The total number of such 5-digit numbers greater than 50000, formed under the given constraints, is 4608.