You need to specify the aggfunc as len:
In [11]: df.pivot_table(index='Account_number', columns="Product",
aggfunc=len, fill_value=0)
Out[11]:
Product A B
Account_number
1 2 0
2 1 2
3 1 1
It looks like count, is counting the instances of each column (Account_number and Product), it’s not clear to me whether this is a bug…