Let $E\rightarrow M$ be a vector bundle of rank $n$ endowed with a connection $\nabla$. We can define the sheaf of parallel sections by setting $\Gamma_0(U)=\{s\in\Gamma(U):\nabla s=0\}$. Let $\Gamma_0(p)$ be the stalk of this sheaf at a point $p\in M$.
If $\dim\Gamma_0(p)=n$, we can choose a local basis consisting of parallel sections $s_1,\dots, s_n$, and we can show that the curvature $F^\nabla(p)=0$.
In general, is there a numerical relation between $\dim\Gamma_0(p)$ and $\mathrm{rank}F^\nabla(p)$?
A parallel section of $E$ is completely determined by its value at $p \in M$. So you can identify the stalk of this sheaf at $p \in M$ with a linear subspace $W \le T_p M$.
The value of the curvature tensor at a point $p \in M$ can be thought of as an element of $\wedge^2 T^*_p M \otimes T^*_p M \otimes T_p M$. We define the rank of a tensor to be the minimal number of simple tensors needed to express it.
You can check this fact yourself by choosing a basis, but one can show that if you have a tensor $T$ which lives in a vector space $V$ which is made up of some tensor products, then for each linearly independent simple tensor (say $u \in V^*$) such that $ \langle T, u \rangle = 0$, you can bound the rank of $T$ by one.
That said, lets get back to the problem. The usual formulas for dimensions of our spaces tell us that the dimension of $ \wedge^2 T^*_p M \otimes T^*_p M \otimes T_p M$ is $n^3 (n-1)/2$. So that is the maximum possible rank.
Now, if you have $w_1 , \ldots , w_k \in W$ which are linearly independent. Then you know that for $i=1,\ldots k$, we have that: $$ \forall v_1 , v_2 \in T_p M , \ \eta \in T^* M \qquad \langle F^\nabla (p) , v_1 \wedge v_2 \otimes w_i \otimes \eta \rangle = 0 $$
Since you have $n^2(n-1)/2$-dimensions of choices for $v_1, v_2$ and $\eta$, it follows that the rank of $R^\nabla$ is bounded by $(n-k)n^2 (n-1)/2$. Notice that if $k = n$ then the rank is zero so this agrees with your example case.