updated function signature and added input parameter tests
unit test for countstat module