It's a good question, TMM must be internally calculating the count and storing it. The functionality (count) is then presented to you through that "Enable movie set tokens..." checkbox.
tick box checked: Even when there is just ONE movie in a set, the renamer will use the movieSet.title token and name your folder/files accordingly.
tick box unchecked: Two or more movies need to be in a set for the renamer to use the movieSet.title token.
So there is no need to manually compute the count. You also don't need to set anything else up - just add the token to your folder name scheme.
For testing/learning purposes,
1. Create a folder and put copies of three movies in there. Two of these movies should be part of the same set (Iron Man 1, Iron Man 2) and the third movie (Captain America: The First Avenger) should be part of another set.
> Point TMM to this folder as the only data source, change the renamer settings for the folder to
(windows OS only!!!)
Code:
${movieSet.title}\${title} (${year})
2. Select the movies and run the renamer.
Edit: Was putting this together before @
mlaggner posted right before me, you can also use the argument he posted too (which is in linux format) if you prefer. But don't activate/check the box - because thats not what you want according to your first post.