Forgot to initialize gram count with zero, fixed.