To find out how many more trick-or-treaters Pirate Pete had than Marty Monster, we can subtract the number of trick-or-treaters that Marty had from the number that Pirate Pete had.
Marty had 147 trick-or-treaters, and Pirate Pete had 165 trick-or-treaters.
So, we can calculate:
\[ 165 - 147 = 18 \]
Pirate Pete had 18 more trick-or-treaters than Marty Monster.