Moves Thing to test directory as only used in tests
Adds functions to logic: sum, average and count
Makes count function more flexible