Count Most Recent Browser Used By All Users
Not your exact requirements (instead of ignoring data from users inactive the last year, the following queries ignore all data older than a year) but you can get ideas and change the conditions to more complex if needed:


Count all Login and browser Type combinations, up to a year ago. 

; WITH cte AS
( SELECT    *
  FROM      Browser
  WHERE     Timestamp &gt;= DATEADD(Year, -1, GETDATE())
)
SELECT      Type,
            Count = COUNT(DISTINCT Login)
FROM        Browser
GROUP BY    Type ;

Count only most recent browser Type per Login, up to a year ago.

; WITH cte AS
( SELECT    Type,
            Login,
            Rn = ROW_NUMBER() OVER (PARTITION BY Login
                              ORDER BY Timestamp DESC)
  FROM      Browser
  WHERE     Timestamp &gt;= DATEADD(Year, -1, GETDATE())
)
SELECT      Type,
            Count = COUNT(*)
FROM        cte
WHERE       Rn = 1
GROUP BY    Type ;

Count up to 5 recent browser Type per Login,  and up to a year ago.

; WITH cte AS
( SELECT    Type,
            Login,
            Rn = ROW_NUMBER() OVER (PARTITION BY Login
                                    ORDER BY MAX(Timestamp) DESC)
  FROM      Browser
  WHERE     Timestamp &gt;= DATEADD(Year, -1, GETDATE())
  GROUP BY  Login, Type
)
SELECT      Type,
            Count = COUNT(*)
FROM        cte
WHERE       Rn &lt;= 5
GROUP BY    Type ;



Tests at SQL-Fiddle