In addition you can return the number of products of an order ID that appear in the list with this formula. It works in my Excel 2013 sample sheet and has to be confirmed by pressing ctrl+shift+enter.
=SUM(COUNTIFS($A$2:$A$16,A2,$B$2:$B$16,$D$2:$D$4))