Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I forgot to mention that oracles need to be a decidable language. And to answer your question consider a P machine M (machine with polynomially-bounded resources) with an oracle to another P machine N. Then $L(M^N) \in P$, and in general $P^O=P$ for any given $O$. So here there is no contradiction.
that number is not necessarily a natural, because it is a ratio like approximate number of solutions per random $D$. Maybe you can take the floor or ceiling of that.