How many classes can we have in the same package?
As many as you want. Even though it has a theoretical limit, it is much larger than the practical limit.
What exists is only a recommendation for one class per source file.
And this has nothing to do with Eclipse, whether it's using this IDE or not. This is a Java implementation issue you are using. See What is a programming language, IDE, and compiler? .