I am trying to count how many instances of a specific number occur on one range of cells depending on the value of another range of cells directly left of the count range. I then need to multiply the count value by another cell value, say its value is 172.
So lets say I want to count how many hours are = to 8 when the start time is 6.
Any help appreciated.

COUNTIFS()-->=COUNTIFS(B2:B12,6,C2:C12,8)