The scoring breakdown is as follows:
1000 points per battle won
80 points per opposing Pokémon fainted
5 points per switch
1 point per super-effective attack
4 points per opposing attack that is rendered ineffective (either from type immunities, Levitate, or a status attack that the Pokémon is immune to due to its type)
2 points per opposing attack that is rendered not very effective
30 points if a battle was won with the opposing side taking at least one turn, 15 points if a battle was won without the opposing side taking a turn
-80 points per Pokémon fainted
-10 points per turn
-10 points per ineffective attack against the opponent (on the same basis as the above)
-2 points per resisted attack against the opponent
1 point per percent of HP remaining after each battle
So if you did the best performance possible:
5 wins(5000)
15 enemy Pokemon fainted(1200)
15 super-effective attacks(15)
15 attacks against you that are ineffective(55)
Battle won with the opponent taking a turn(30)
0 Pokemon fainted(-0)
15 turns(-150)
0 attacks rendered ineffective(-0)
0 attacks not very effective(-0)
100 percent HP remaining(100)
So the maximum would be: 6250
Actually, because of the switching rule: 5 points per switch, it would be near infinite if you kept switching until your Pokemon near fainted, and how many switches you could pull of depends on the Pokemon. Also you would be giving up other factors that give points, so I think 6250 is the appropriate number.
Hope I helped!
Source: Math and this.