What you need is a bistable -- you can make that from a couple of transistors.
A bistable has 2 states (often it has 2 transistors in opposite states, but not always). Lets call these states "ON" and "OFF".
This state information (it may be the voltage on the collector of a transistor) can be used to do something. Let's say we take it and use it to switch a relay on and off via another transistor.
Lets assume that the relay follows the states we've determined. So when the bistable is "ON" the relay is also on. When the bistable is "OFF" the relay is off.
The thing about bistables is that you have 2 inputs. One will turn the bistable to the "ON" state, and while it's in the "ON" state that input will do nothing further. The other input will turn the bistable "OFF" and while it is off, the inut will do nothing further.
Going back to our problem, we want to turn the pump on when the lower sensor reads no water, and off when the upper sensor detects water.
Can the bistable help?
Lets assume that the pump is off. The bistable must be off (because the pump is off) This means that the water level in the tank will fall. Thus we need to do something when the bottom sensor is exposed.
Clearly when the bottom sensor is exposed, we need to send a signal to the bistable to turn it "ON"
With the bistable turned ON, and therefore the pump turned on, the level in the tank will rise. At this point we don't care what the bottom sensor does (and we know the bistable will ignore it) Great! But now we need to wait until the top sensor detects water.
When the top sensor detects water it also needs to send a signal to the bistable. In this case it needs to send a signal to the input which turns the bistable (and the pump) off. And we haven't used that input yet (surprise? I guess not).
We know that if we use the top sensor to signal the bistable to turn off that it will ignore the top sensor until the pump is turned on again. That's great, we want to allow the level in the tank to drop...
And now we're back where we started. This cycle will repeat forever (which is presumably what we want).
The only thing we need to do is to ensure that the signals we get from the sensors are correct.
We need to ensure that whatever signal is required to change the state of the bistable (it is usually the same for both inputs), it needs to be generated when the bottom sensor is exposed, and the top sensor is covered.
If they are similar sensors, they might (for example) generate a voltage when they detect water. This may be fine for the top sensor (if that voltage will trigger the bistable to change state), but it is exactly wrong for the bottom sensor. You would need to use another transistor to invert the signal from the bottom sensor.
So with 1000 transistors, I estimate you'll have around 996 left over after you've made this