Kellen is playing a board game with a six-sided number cube. Every time he rolls an even number, he moves ahead 4 spaces. Every time he rolls an odd number, he moves back 1 space. After rolling the number cube 8 times, he has moved ahead a total of 17 spaces. How many times has he rolled an even and an odd number on the number cube?