STFT - DFT size of the bins
The overlap is the way that you walk on your signal to be analyzed, lets go to an simple example, imagine that your signal X has a length = 14, NFFT = 4 and overlap/hop = 2

X = 1 2 3 4 5 6 7 8 9 10 11 12 13 14


To know the number of blocks of analysis you will:

int(n_samples/Overlap) - 1 


Then for this example:

(14/2)-1 = 6


lets get 4 points from X to pass to your FFT

At the first time you get from X

X2 = 1 2 3 4


from now you need overlap by 2

X2 = 3 4 5 6


Third time

X2 = 5 6 7 8


fourth time

X2 = 7 8 9 10


fifth time

X2 = 9 10 11 12


sixth time

X2 = 11 12 13 14