[sql-server] sql set variable using COUNT