Count all distinct pairs with difference equal to k