Which number should replace the question mark? 17 8 5 5 13 7 5 4 6 12 6 3 10 6 4 ?

Answer: 
4
Which number should replace the question mark? 17 8 5 5 13 7 5 4 6 12 6 3 10 6 4 ?