Count loops