Vue.js – How to perform an expression inside html code, without printing it?

I want to add a value to a variable inside the loop in my Vue.js component, like this:

<div v-for="(post, index) in posts" :key="index">
  <h1 v-if="post.author =='John'">
    John
    {{i++}} // i is a variable in my data, I don't want this to be printed to the DOM
  </h1>
</div>

I don’t want $i to be printed to the DOM. I just want it for a check later in my code.