There were 2.47 billion children on Gallifrey that day in The Time War and the thing is, despite all the corruption among the ruling Timelords, not all who were on Gallifrey were Timelords and not all were corrupt.
This is why the children matter and why he counted them apart from every other person on Gallifrey.
The children were the truly innocent ones. They could have gone on to be and do anything. Even if he couldn’t save the corrupt Timelords, the children didn’t have to be like their parents. They could have changed Gallifrey and rid it of the corruption.
And so he spent all those years thinking he murdered 2.47 billion children on his own planet because the generations before theirs had fallen into so much corruption that he had no other choice.
So, of course, when he sees a child crying, he stops and helps them because even though he can’t make up for all those he killed, if he can help one child, he will.
When he thought he destroyed Gallifrey, maybe he thought he could learn to live with it and sometimes it seemed like he could, but if 400 years of living with it showed him anything, it’s just how much he needs to find another way.
Those years weren’t lost. They weren’t erased. He still lived every moment thinking he killed them and he will never forget that. Because of it, he now knows more than anyone why he can’t destroy his entire planet despite their corruption - why he can’t keep on the path of the man who forgets.
Gallifrey isn’t really saved yet and we don’t know how he can do it, but now he has a chance. He has a chance to let those children grow up and change their world.