The principal at Stars Hollow High tells Luke that Jess stole every single baseball in the school, but he never specifies how many. However, in a later scene, Luke asks Jess what he could possibly need with 500 baseballs. Where did he get the number 500?
Possible explanation: Luke attended the same high school when he was young. Actually he was on the track team (we find this out in the 3rd season, ep.4 One's Got Class and the Other One Dyes) so he might know the inner workings of the school.