Code block 1 seems to do less operations per second. You can measure the performance by using tick(). I do not think that performance is very important here though, so I would just choose the solution that you think is the most simple and logical if I were you.
tick example:
local function measurePerformance(func)
local t1 = os.clock()
func()
return os.clock() - t1
end
while wait(1) do
print(measurePerformance(function()
counter+= 1
if counter > max then counter = 1 end
end)
end