Newdf=df.melt('Date')
Newdf.value=Newdf.value.eq(0).astype(int)
Newdf.groupby(['Date','variable']).value.value_counts().unstack([1,2]).sort_index(level=0,axis=1)
Out[69]:
variable B C
value 0 1 0 1
Date
20.07.2018 NaN 2.0 1.0 1.0
21.07.2018 1.0 1.0 1.0 1.0