Try this for A < B:
Code:
=SUMPRODUCT(--(A1:A4<B1:B4),--(B1:B4>=TIME(3,0,0)),--(B1:B4<=TIME(4,0,0)))
This for A > B:
Code:
=SUMPRODUCT(--(A1:A4>B1:B4),--(B1:B4>=TIME(3,0,0)),--(B1:B4<=TIME(4,0,0)))
If you want to put the high and low time values in cells, you can change them easier than using TIME(3,0,0) and TIME(4,0,0).
Regards,
Ax