select sum(cnt) from ( select webname,count(distinct time) cnt from table  where id  = 用户id group by webname )a