Certificate of Origin, a solution to double energy attribute counting