I don\'t why that I can\'t manipulate declared var on if block.
var count = 0; if (count !== 2) { count++; } else { count = 0; }