I'm not sure what the query mechanism will do when scanning multiple times over the same data set (sort of like a computational area under a curve), but it works ...
WITH v(date, weather) AS ( VALUES ('2016-02-01'::date,'Sunny'::text), ('2016-02-02','Cloudy'), ('2016-02-03','Snow'), ('2016-02-04','Snow'), ('2016-02-05','Cloudy'), ('2016-02-06','Sunny'), ('2016-02-07','Sunny'), ('2016-02-08','Sunny'), ('2016-02-09','Snow'), ('2016-02-10','Snow') ), changes AS ( SELECT date, weather, CASE WHEN lag(weather) OVER () = weather THEN 1 ELSE 0 END change FROM v) SELECT date , weather ,(SELECT count(weather)
source share