Five years for what he did, the rest because he tried to run. Yes, 24601.
Been a long time since I read it, but from what I remember Javert was deeply religious, to the point it was the foundation of his being and the reason he disintegrated when he couldn't fit Valjean into his worldview. This aspect of his character is just about visible in the musical, though not very overt, but downplayed or abandoned altogether in some adaptations (such as the TV version with Dominic West).You probably were thinking of Javert, although I doubt the notion of a hell ever mattered to the man.
It's hard to get into that within the scope of forum rules, however.