From a concern separation POV, it's probably better to do the accounting separately, incrementing a range_completed variable seems good. (Also if you have 10,000 ranges, it gets a bit funny to do 10,000 queries to get the status)