Quantum Statistics of Nonideal Systems