this module could use some typespecs. one for `pncounter` and all the exported functions.