Better, but this line is wrong
if(digitalRead(sensorPin) == HIGH);
The semicolon should not be there, because with it in place, when the sensor pin is HIGH the only code that will be conditionally executed is the semicolon and the code in the following code block will always be executed irrespective of the state of the sensor pin.
The same goes for the second if test in your code.
Soon we will be talking about how to wait a while when 2 bottles have been detected. Can you please explain exactly what should happen after the relay has been activated.