Added code for counting number of adds, but it is terrible slow.