add Count to template and tests
move test struct to separate file
organize the tests a bit