I am trying to make a simple query to my server and want the result to be stored in the variable @times.
DECLARE @times int SET @times = SELECT COUNT(DidWin)as
You want:
DECLARE @times int SELECT @times = COUNT(DidWin) FROM thetable WHERE DidWin = 1 AND Playername='Me'
You also don't need the 'as' clause.