Start by assuming that $\{e_1, e_2, e_3, e_4, e_5\}$ is a basis for $\Bbb R^5$.
We start by trying to create some $T$ that satisfies what you describe, a $T$ such that $T^4(x) = 0\ \forall x$.
Try this:
$$\begin{cases}T(e_1) = 0\\T(e_{i+1}) = e_i, i > 1 \end{cases}$$
So what is the power of $T$ that takes all the vectors from the basis to $0$? Well, $T^1$ takes only the first, $e_1$, $T^2$ takes $e_1, e_2$, ..., $T^4$ takes $e_1, e_2, e_3$ and $e_4$. Thus it is only for $T^5$ that we have $T^5(x) = 0$. So what if we redefine our $T$ as
$$\begin{cases}T(e_1) = 0\\T(e_2) = 0\\T(e_{i+1}) = e_i, i > 2\end{cases}$$
can you see that $T^4(x) = 0$ and that $T^3 \neq 0$? If this is our $T$, then rank $ T = 3$. Can you see why?
So your answer could be $3$. Is it the only valid option? We can prove so. Remember that if $T$ is a linear transformation from $\Bbb R^5$ to itself, then $\Bbb R^5 = N(T) \oplus R(T)$.
Write a basis for each of the nullity of $T$ and the row space of $T$. If $T$ has rank $2$, then the row space has dimension $2$ and the nullity has space $3$. Now, if a vector $v$ belongs to the null space, $T^k(v) = 0\ \forall k>0$. However, the image of a vector belonging to the row space can still be a vector belonging to the row space, or belonging to the nullity. But we know that $T^4(x) = 0$ so it must be the case that every time you apply $T$ to every vector you have, some vectors of the row space get mapped to a vector from the nullity. In what ways can this happen? Try sketching a bit. Can you work this out?