The Pila-Wilkie theorem states that if a set X ⊆ R n is definable in an o-minimal structure R and contains 'many' rational points, then it contains an infinite semialgebraic set. In this paper, we extend this theorem to an expansion R = R, P of R by a dense set P , which is either an elementary substructure of R, or it is independent, as follows. If X is definable in R and contains many rational points, then it is dense in an infinite semialgebraic set. Moreover, it contains an infinite set which is ∅-definable in R, P , where R is the real field.