Generating field of number of dark matter halos