We can break down the sentence to make it simpler, as there are quite a few phrases inserted that are not part of the essential idea.
Mr Filch, the caretaker, has asked me, for what he tells me is the four-hundred-and-sixty-second time, to remind you all...
The words in bold are the important words. By removing the other words we end up with a simple statement:
Mr Filch has asked me to remind you all...
The words we eliminated are just there to provide certain background information. If we want to know who Mr Filch is we can restore the phrase the caretaker. If we want to know how many times Mr Filch has made this request we can restore the phrase for the four-hundred-and-sixty-second time. If we want to know how Dumbledore knew that it was the four-hundred-and-sixty-second time we can restore the phrase what he tells me is.
The phrase four-hundred-and-sixty-second time which might have confused you, is referring to the number of times the request has been made. The word second is not being used as the unit of time passage; rather it is the last digit of the number 462. To make this simpler we could imagine it with a less complex number. If the request had only been made on four previous occasions, the sentence would instead read:
Mr Filch, the caretaker, has asked me, for what he tells me is the fifth time, to remind you all...
Here there is no confusion because fifth is not a homonym like second is.