In this paper we present a new mixed-variables symplectic tree code for planetesimal dynamics, which allows to use a very large number of particles in numerical simulations of planet disk interaction. Furthermore, we discuss how a wrong election of the number of particles to model a planetesimal disk, in order to carry out realistic numerical simulations, can cause spurious result. If the particle number is not enough, the close encounter between the planet and unrealistic massive particles will introduce a stochastic component of planet migration. This has an impact on the migration rate and it can even change its sign. Finally, we describe how to determine the minimum number of disk particles that should be used in numerical simulations, in order to have a correct description of the interaction, especially when the dynamical friction on the planet is the relevant mechanism of migration.