I looked at the paragraph in MTW that you are trying to understand. I have read it many times and I cannot follow it either (probably due to my lack of ability).
For the action principle you need a scalar (invariant) quantity determined by the metric ##g_{\mu \nu}## and its derivatives. Using the Riemann curvature tensor, there are many scalars that you can construct, especially if you include covariant derivatives of the curvature tensor. These scalars are called curvature invariants. You can find some information about these invariants doing a web search.
For example
https://en.wikipedia.org/wiki/Curvature_invariant
At this link
http://cds.cern.ch/record/580327/files/0209024.pdf you can see that they mention that there are 14 curvature invariants of zeroth order (i.e., the invariants do not involve derivatives of the curvature tensor).
I have not found a link that proves there are 14 such invariants. In particular, I cannot find an argument that is similar to MTW's argument.
There are some relevant threads on Physics Forums. This one gives a detailed argument for the choice of the Ricci scalar as the Lagrangian
https://www.physicsforums.com/threa...hilbert-action-come-from.449920/#post-3021374
More discussion here
https://www.physicsforums.com/threads/einstein-hilbert-action-origin.838487/
Here are some general comments about the Hilbert action from page 114 of Sean Carroll's notes
https://arxiv.org/pdf/gr-qc/9712019.pdf
https://www.physicsforums.com/attachments/upload_2017-11-18_13-12-24-png.215220/ Anyway, none of this helps much with deciphering the particular wording of the paragraph in MTW. But even if we could understand the argument for why 14 invariants, it doesn’t seem to matter much. The rest of the paragraph makes no use of the 14. It simply goes on to state that only one of these 14 curvature invariants is linear in the second derivatives of the metric tensor, and this is the Ricci scalar R. So, it seems to me that the argument of MTW concerning the 20 independent curvature
components (which somehow implies that there are 14 curvature
invariants) is not very important to the final conclusion.
But I'm with you. I don't follow the argument that takes you from 20 independent components of the curvature tensor to 14 curvature invariants.