Update to generateCount

- generateCount used to just run through all attributes and save them, to
  generate the count. It led to VERY long execution times on larger
  databases (25k+ attributes). With the extra processing that each save()
  does for attributes, this was horribly slow.

- new generateCount just saves the events based on the number of
  associated attributes, only having to save the events (of which there
  are considerably less).