In B6 cell
Formula: copy to clipboard
=COUNTIFS(Data!$A:$A,$I$2,Data!$B:$B,B$5)

Drag it to right

In B7 cell
Formula: copy to clipboard
=SUMIFS(Data!$C:$C,Data!$A:$A,$I$2,Data!$B:$B,B$5)

Drag it to right

Hope that helps!