To return a count of unique times that are greater than or equal to 18:00 and less than or equal to 22:00, try the following formula that needs to be confirmed with CONTROL+SHIFT+ENTER...
=SUM(IF(FREQUENCY(IF(E2:E100>="18:00:00"+0,IF(E2:E100<="22:00:00"+0,E2:E100)),E2:E100)>0,1))
or
=SUM(IF(FREQUENCY(IF(E2:E100>=G2,IF(E2:E100<=H2,E2:E100)),E2:E100)>0,1))
...where G2 contains the start time, and H2 contains the end time. To include the date, try the following formula instead that also needs to be confirmed with CONTROL+SHIFT+ENTER...
=SUM(IF(FREQUENCY(IF(A2:A100+E2:E100>="1/15/2017 18:00:00"+0,IF(A2:A100+E2:E100<="1/15/2017 22:00:00"+0,A2:A100+E2:E100)),A2:A100+E2:E100)>0,1))
or
=SUM(IF(FREQUENCY(IF(A2:A100+E2:E100>=G2+H2,IF(A2:A100+E2:E100<=G2+I2,A2:A100+E2:E100)),A2:A100+E2:E100)>0,1))
...where G2 contains the date, H2 contains the start time, and I2 contains the end time. Adjust the ranges accordingly. However, try to avoid using whole column references, since it would likely slow down the calculations considerably.
Hope this helps!