Count Number of Bad Pairs