Refactored vacationcount and fixed bugs