In the class I am teaching I tried to count number of independent components of the Riemann curvature tensor R_{ijkl} accounting for all the symmetries. We’ll call it RCT in this note.
It turned out to be not so straightforward, so I decided to write it down here.
First of all, here are the three symmetries/skew-symmetries of R_{ijkl}:
The first two expressions tell us that R_{ijkl} is skew-symmetric in the first two and the last two indices. And form the last we can deduce that R is symmetric in the pairs ij and kl.

There is an interesting fact behind these identities. Listen to it carefully, R is a symmetric bilinear form on wedge-products X_i\wedge X_j and X_k\wedge X_l. In some sense it is a bilinear form on a pair of planes. Each X_i\wedge X_j defines a plane spanned by X_i, X_j. When we swap i and j the wedge product changes sign (\wedge is skew-symmetric). Thus we have a minus in the first identity above. Similar situation is with the second identity. The third identity corresponds to swapping the planes X_i\wedge X_j and X_k\wedge X_l. It is a symmetric form on planes, so the sign doesn’t change.

Another set of symmetries is the Bianchi identity, involving cyclic permutations:
(*) R^l_{ijk} + R^l_{jki} + R^l_{kij} = 0.
Here the curvature tensor is with the raised index. We are using the definition R_{imjk}=R^l_{ijk}g_{lm}.

I have found two ways to compute number of independent components of RCT. Let us consider the first one.
In N-dimensional space there are N^4 possible values for R_{ijkl} not counting the symmetries.
Consider R_{IJ}, where I and J are each a pair of indices: I=\{i,j\},  J=\{k,l\}.
The number of different I‘s that correspond to different values of RCT is N(N-1)/2 (pairs \{i,j\} and \{j,i\} will define the same value, upto a sign; a pair \{i,i\} will make R_{iikl}=0). The same for J‘s. So far we took care of the first two identities. Denote by $\latex D:=N(N-1)/2$. The third identity tells us that R_{IJ} is symmetric in I,J, thus we have D(D+1)/2 distinct entries of RCT. Or, in terms of N,
\displaystyle \frac{1}{4}N(N-1)\left(\frac{N(N-1)}{2}+1\right).

Now we need to subtract the number of distinct equations (*), since each equation will reduce the number of independent values of RCT by one.
This part is not so trivial. It turns out, by lowering the index and using all the anti-/symmetries one can write equation (*) as
R_{[ijkl]}=0, which means the sum over all permutations of indices i,j,k,l with a sign, determined by a parity of a permutation. The number of equations of the type R_{[ijkl]}=0 is equal to the number of ways one can choose 4 distinct indices from N. It is equal to \binom{N}{4}=\frac{N!}{(N-4)!4!}.

The final answer to the number of independent components of the RCT is
\displaystyle \frac{1}{4}N(N-1)\left(\frac{N(N-1)}{2}+1\right) - \frac{N!}{(N-4)!4!}.
Which is equal to (after some algebra)
\displaystyle \frac{N^2(N^2-1)}{12}.

Ooof, that was long. I will describe the second method of obtaining the same number briefly.
It basically consists of evaluating how many ways you can choose four indices out of N, and then, based on identities, how many different R_{ijkl}‘s that corresponds to.
If all the indices are equal than R_{iiii}=0. Not interesting. If there are only two distinct indices i,j, they correspond to only one value, say R_{ijij}. All others are zeros or equal to \pm R_{ijij}. So there are $latex\binom{N}{2}$ ways of choosing 2 distinct indices out of N, thus there are $latex\binom{N}{2}$ distinct values of RCT, so far. For 3 distinct indices (i,j,k), there are $latex\binom{N}{3}$ possible values. And the fourth index should be a repeated index, it is either i, or j or k. So 3\binom{N}{3} values of RCT so far.
Now, there are N(N-1)(N-2)(N-3) ways of choosing 4 distinct indices. The three symmetries reduce this number by 8 (each one halves). And the Bianchi identity is a famous example of “buy 2 get third free!“. In other words, if we know two of the values of RCT, then the third one is determined by the Bianchi identity. So we need to multiply the last number by 2/3, i.e. we have N(N-1)(N-2)(N-3)/8*2/3.
\displaystyle \binom{N}{2} + 3\binom{N}{3} + \frac{2}{3}\frac{N(N-1)(N-2)(N-3)}{8}.
Which yields exactly the same value.

P.S. I became a bit dizzy after typing so many times unusual plural of index. Should I have used indexes? WordPress underlines word indices as wrong.