Stanford CS106A Min / Max program
You could initialize min with Integer.MAX_VALUE and max with Integer.MIN_VALUE, this would make the inner if obsolete. You could also use this for your output condition and get rid of the count completely.

Without knowing the complete assignment, it's hard to optimize your code in any direction.

If you don't want to use your library and do it in 'plain' Java have a look at Scanner.