seperate the counter function to another file (a .h header)