Fixed Bug in CountGeneration and added Tests

It looks like it works fine now!