For starters, you have labeled the vertical axis "y". Does the book label the vertical axis as y? The vertical label should be f(x), because nowhere in this problem is a variable y referenced. I will assume you have labeled it as y out of habit...

So, f(x) = 0 when y = 0. How many times between 0 and 5 do you see the graph cross the x axis? Where it crosses is where f(x) = y = 0. We know that the graph repeats its pattern every 5 units of x, so how many times do you count it will cross between 0 and 12? The answer in the book is correct.