Understanding LSTM structure
Adding 

model.summary()


Produces this output 

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
input_layer (InputLayer)     (None, 50, 10)            0         
_________________________________________________________________
lstm1 (LSTM)                 (None, 50, 128)           71168     
_________________________________________________________________
lstm2 (LSTM)                 (None, 64)                49408     
_________________________________________________________________
dense1 (Dense)               (None, 128)               8320      
_________________________________________________________________
dense2 (Dense)               (None, 64)                8256      
_________________________________________________________________
output (Dense)               (None, 1)                 65        
=================================================================
Total params: 137,217
Trainable params: 137,217
Non-trainable params: 0
_________________________________________________________________



LSTM Unit indicates dimension of Layer's output. 
LSTM Layer (lstm1 for example) , processes 1 input (50,10 in this example) and generates 128 bit representation of each timestep. 
lstm2 does generate a single vector with 64 values. It needs to learn ~49k parameters that are required to transform output to a single vector 


References :

https://www.researchgate.net/publication/13853244

https://www.quora.com/What-is-the-meaning-of-%E2%80%9CThe-number-of-units-in-the-LSTM-cell

https://www.quora.com/What-the-difference-between-an-LSTM-memory-cell-and-an-LSTM-layer