If we were to count the classes, we would say that one class consist of 2 people, and the other of 20000.
But those are just numbers.
My point is that numbers are useful for us in understanding how to interact with the world. If you don't plan to interact with the trees, you probably don't need to count them. But if you are going to use them for firewood or building materials, the knowing the difference between 2 trees and 20000 is useful.
Identifying the difference between 19,999 and 20,000 is certainly not significant in this way. 19,999 is already "too many" students; or, "plenty" of firewood. I don't need to count them to know this.
I'd say the difference between 5 and 6 is already relatively unimportant in these contexts.
Also, if 20000 students need training, as a teacher you can still provide training, you just need to do so in other ways. Either, you can recruit more teachers to help you (and then it matters if the number is 10000 students or 20000 students), or you can switch to another medium (a book, a video, on-line training).
Treating a student body as a number will make it more managable for you to provide/organize training to them than just hireing more teachers at random until each student gets enough attention.
Likewise, 2 trees may keep you warm for a week, 20000 may keep you and half your (small) village warm for a year, with enough trees left over for the forest to replenish.
It's not that useful to count them. My personal interactions with trees have likely never involved counting them; not even when I was involved in woodland management.
Trees control their numbers according to whether or not they can reasonably live in a particular density of tree coverage.
Only humans want to count trees, perhaps in general to claim (abstract) ownership of a particular large number.