The question of the number of gluon a proton consists of is not well posed.
Let's start with a simple example, the H-atom. A constituent model of the H-atom would say, the H-atom consists of 1 proton and 1 electron. But they are bound by the EM-field, so there are also a "couple" of virtual photons around.
Probably by taking the field strength of this EM-field (binding energy for the ground state -13.5eV) and some other assumption one can come up that the electron and the proton exchange a myriad of virtual photons per second, I don't know how many, $10^6$ or $10^9$ or ???
Even worse, the photon number operator does not commute with the field of operator of the EM-field, i.e. the exact number of photons is unknown; well at least we can compute a distribution function of virtual photons which may be around.
But as in general we don't know the excitation state of a H-atom we would just say the H-atom consists of 1 proton and 1 electron.
But for the proton it is actually much more complicated. Because it depends on the energy scale you look at the proton. In the H-atom QED governs, but in a proton QCD governs. The big difference between QED and QCD is that in QCD the coupling constant becomes smaller at higher energy whereas in QED it becomes larger at larger energy. Important detail of this is that the coupling constant of QED is small at low or zero energy, whereas the coupling constant of QCD is very large at low energy. At very low energy we are not able to compute the interior of a proton, because the perturbation theory does not work, may be there are some unperturbative methods as for instance QCD on a lattice. In this context the interesting question how the binding energy between the quarks is distributed over the gluons is justified and this, I think, has an answer (which I cannot say much about as non-QCD expert) from lattice QCD. A well formulated question on PSE might provide answers to it.
Let's go to an energy scale where perturbation theory works. The best example is deep-inelastic scattering (DIS). This can be done at different energy scales, $Q^2 = (k-k')^2$ the invariant 4-square of the energy-momentum transfer when a lepton (electron or muon etc.) with incident 4-momentum vector $k$ leaves the interaction zone with a 4-momentum vector $k'$.
So this can be done at say $Q^2=400GeV^2$, or $Q^2=4000GeV^2$ or even at $Q^2=400000GeV^2$ and so on. At these energy scales it is easy to create additional particles as enough energy is available.
Amazingly perturbation theory can be applied in these cases for QCD. For the description of the interior of the protron so-called structure functions were introduced, structure functions for valence quarks, for sea-quarks and of course for gluons.
The gluon-structure function of the proton provides information on the gluon content of the proton (If you want to know more about this, just google it).
However, and that is the keypoint here: The gluon-structure function is the function of $Q^2$, therefore the "number" (if QCD-experts allow me to use this word which might not make really a sense) of gluons depends on the energy scale you use for looking at the proton.
Depending on the energy scale one might find a little or a large number of gluons.
And even if one would stick to one fixed energy scale, the gluon-structure function is a distribution-function, as well as for the photons in a H-atom. Therefore, a statement: a proton consists of 3 quarks and x gluons cannot be made.
One cannot even say a proton consists of 3 quarks. Depending on the energy scale a different number of quarks can be found in the proton, the constituent quarks + the sea quarks.
The question is similar to the question: What is the position of an electron being in the ground state of an H-atom ? QM does not allow us to know this.