refactoring counting different type of tests.