Before recount begins, petition board of elections to cast aside ballots that are illegitimate based on whatever evidence you can provide
Board of Elections casts aside ballots and then does the recount*
If they do NOT cast aside, then Trump Team can petition the courts and appeal all the way to the SCOTUS, which holds up the recount, until a decision has been rendered. At which time, the recount will commence with the ballots either removed or not.
DC_Draino has a great point. Easily understood!
Except the way it works is this: