Add count to results and add Access-Control-Allow-Origin header to responses