Using reduce instead of iterating for counting completed todos.