The number of moles in a liter depends on the substance and its concentration—there is no single answer. However, if you're asking about an ideal gas at standard temperature and pressure (STP), one mole of any ideal gas occupies approximately 22.4 liters, which means one liter contains about 0.0446 moles of gas.
For solutions, molarity (M) expresses moles per liter directly. A 1 M solution contains exactly 1 mole of solute dissolved in enough solvent to make 1 liter of total solution. A 2 M solution contains 2 moles per liter, and so forth.
The relationship between moles and volume is governed by different principles depending on context: for gases, the ideal gas law (PV = nRT) applies; for solutions, molarity is the standard concentration unit. Temperature and pressure significantly affect gas volume, which is why STP conditions must be specified.
To calculate moles in a liter of any substance, you need to know either the molarity of a solution or apply the gas laws with known pressure and temperature for gaseous substances. Without this additional information, you cannot determine how many moles occupy a liter.