added function for counting tests with code