Change total when length of task changes

Only two cases, not valid reason for creating a watcher, so this was my
approach
Generating id for new tasks

Simple implementation, getting the bigger id and increasing it by one.
Changed to only increase or decrease

Changed to only increase or decrease, instead of increasing/decrasing
and then assigning
Merge pull request #1 from Fearful/master

Fix for count of tasks update value & generating simple id for new tasks