Use count value for case in MYSQL