Fixed add new todo

Bug : When you delete a todo2 and then add a new todo, it'll update todo3 instead of adding a new todo i.e todo4.

Now I check in a loop if the new todo id exists or not. If it does, then I increment the count not just len(TODO)+1