adding a test for testing count of loops