A molecular cloud is a cloud of hydrogen and other molecules in space.
You may have noticed that in the atmosphere of Earth there are many clouds of dust and water vapor, and that solid objects like birds and airplanes pass thorugh those clouds with ease.
Molecular clouds are dense compared to most regions of interstellar space, but they are very thin vacuums compared to the clouds in Earth's atmospthere. They have no ability to bounce away a solid object which reaches their boundries. Instead the solid object will pass right through the molecular cloud.
A solid object passing thorugh a molecular cloud will sweep up some of the molecules near its path, creating a tunnel of even thinner vacuum through the cloud. Its gravitational and/or magnetic interactions with molecules it passes might change their paths through space and cause thinner and denser regions to form in the cloud.
The stellar density is the number of stars per unit of volume of space.
In the solar neighborhood, this value can be determined from surveys of nearby stars, combined with estimates of the number of faint stars that may have been missed. The true stellar density near the Sun is estimated as 0.004 stars per cubic light year, or 0.14 stars pc−3. When combined with estimates of the stellar masses, this yields a mass density estimate of 4×10−24 g/cm3 or 0.059 solar masses per cubic parsec. The density estimate varies across space, with the density decreasing rapidly in the direction out of the galactic plane.1
https://en.wikipedia.org/wiki/Stellar_density
If you calculate the volume of a molecular cloud in cubic light years or cubic parsecs, you can calculate the average number of stars which can be expected to be within that volume of space. And if you estimate or choose the volume of space which you count as being near a molecular cloud, you can calculate the average number of stars which would be near the molecular cloud at any one time.
At any one time a molecular cloud might contain one or more stars which are forming or have already formed, but have not yet dispersed. And a large enough molecular cloud will have a large enough volume that it will be statistically probable that one or more older stars that did not form in that molecular cloud will be passing though the cloud at any one time.