Count number representations X^2+kY^2