BeforeAndAfterAllConfigMap Enhancement

Enhanced BeforeAndAfterAllConfigMap to take expectedTestCount into consideration to decide whether to run beforeAll/afterAll.