Adding counting scripts and using them