Compute nextId from max ID in todos collection