added counting of views on server side