WIP sketch of some advert counting code