I'm wondering about the following query :
SET Value = (select count(*)
FROM OtherTable o
WHERE o.UserId = UserId ) <-- this is the part that concerns me
WHERE id in (1,2,3)
SQL Server supports updates using joins.
This means you can write your query like this:
UPDATE s SET Value = d.NumOfRows FROM statisticsTable s INNER JOIN ( SELECT UserId, COUNT(*) As NumOfRows FROM OtherTable GROUP BY UserId ) d ON s.UserId = d.UserId WHERE id in (1,2,3)