Relation between baryonic mass and luminosity I have one simple question: How do we know that dark matter is not just ordinary matter which is simply not luminous? For example if we would take a black rock and put it somewhere in the universe, then we would not be able to see it, because there is not any radiation in the visible spectrum coming from this object.
My question also relates to the question: How do we know that the relation between baryonic mass and luminosity of one object is correct? (which relation does one use usually in this context?)
 A: There's a couple of things worth mentioning.  First, eve thought the rock does not emit light in the visible part of the spectrum I may still radiation at lower frequencies (which in principle makes them detectable). You may argue that if you put them far away it is very difficult to measure them and you'd be right. But there are other arguments that constraint the amount baryonic matter in the universe.
Which brings me to my second point. We now believe that our universe is one in which structures form hierarchically, with small things forming first and growing later through gravity. So at very early epochs all structures were small and started growing by mergers, the problem with this picture for baryons is that they interact with radiation as well, so the seeds of today's galaxies tried to collapse under their own gravity, but photons wouldn't let them. That is, only the biggest seeds would grow, or small ones would grow as well but later when the universe wasn't so dominated by radiation. 
Dark matter does not have this problem, seeds made out of dark matter would grow regardless of the radiation field. If you think about it, this provides a way to measure the amount of baryonic matter relative to dark matter. Just go and measure the sizes of structures out there, what you find is that it is impossible that all matter in the universe we don't "see" is baryonic in nature
A: The main plank of evidence is from the estimated primordial abundances of helium, deuterium and lithium. Big bang nucleosynthesis predicts what these primordial abundances should be as a function of the baryon to photon ratio in the early universe. 
In turn, this baryon to photon ratio leads to an estimate of the ratio of the baryon density to the critical density of the universe multiplied by the present-day Hubble parameter (squared) $\Omega_b h^2$.
Now we know from looking at the dynamics of galaxies; from the dynamics of galaxies in clusters and from a careful analysis of the fluctuations of temperature in the cosmic microwave background that the ratio of "matter" density to the critical density is $\sim 0.3$ (see for example Ade et al. 2015). On the other hand, we know from the primordial abundance estimates that $\Omega_b h^2 \sim 0.02$ (e.g. see here). Given that we know the present day Hubble parameter to be $h \sim 0.7$, this indicates that only 4 per cent of the critical density is in the form of baryonic matter and thus that 26 percent of the critical density is "matter" in a form which is non-baryonic. 
Given that neutrinos and electrons (i.e. leptons) can easily be shown to have a negligible contribution, then we conclude that the majority (about 80 per cent) of matter in the universe is non-baryonic and of a form that does not interact electromagnetically (a.k.a. dark matter).
A second piece of evidence comes from attempts to model how the structures that we see in the present-day universe have evolved from the structures implied by the non-uniformities in the cosmic microwave background. A summary would be that it is impossible to have the rapid evolution of structure that is seen from the tiny fluctuations in the CMB, unless those structures had already been seeded by gravitating matter that was able to "decouple" from the ordinary (baryonic) matter and radiation at earlier epochs. This role is played by non-baryonic dark matter.
