sql update from select count