initial version of ad count script