I can't find how to reset the trained this level-counter. Is there a command to do so via the console, and if so—what is it?
There doesn't seem to be one. However, since you're using the console anyway, you could reproduce training with
advskill to level up the skill and then remove the proper amount of gold from your character with
player.advskill <skill> <nn> player.removeitem f <price>
Well, The answers - including the accepted one, are technically correct, but for the wrong reasons. It's true - you cannot reset the counter; but, you can change how many times you can train per level. Which, unless I'm missing something, would solve your problem just as well.
It's a game setting, by the name of
iTrainingNumAllowedPerLevel and obviously, has the value of five. So, with the
setgs console command, you can set it to six, sixty or 600 - or any other value you wish.
So, just pop open the console, and type in:
setgs iTrainingNumAllowedPerLevel <value>
<value> is how many times per level you want to be able to train. After entering this, the next time you visit a trainer (exit out of training if you have the window open), you'll see the updated limit.
Actually, there's another way. You could use
"player.setlevel <L+1>" where
"L" is your current level, e.g.: my level is 30, so
"<30+1>", then I type
"player.setlevel 31", then type
"player.setlevel <L>" to make it go back to your original level, e.g.:
"player.setlevel 30". When you do that, the training counter resets, since what matters to the game is the change in your level.
I'm saying this out of testing, so I know 100% that it works, since I use it.
<L> is your current level.
"CheatEngine" (a memory trainer) can also be used to find the memory space where the "times trained this level" value is stored (search for 0, train once, search for 1, train again, search for 2, repeat...) you should find it before you get to 5. After that you can reset it to 0, or check the box next to it to lock it at whatever you want. Then you can train over and over without hitting the limit.
Be careful, Memory Trainers can corrupt memory, and thus save game files, if you are not careful.