Jurisdictions that officially register, regulate, or track a person's religion

Bouncing off of

,

I’m looking at this from the vantage point of someone from the US, where a person’s religion, while in many cases socially very important, has little meaning when it comes to legal matters and the general rule is that, in the eyes of the law, a person’s religion is whatever they, in good faith, claim it is at the time, and, outside of institutional settings such as prisons or the military, there is no way of registering a religious conversion, one just converts in fact, and any future interactions with the law where the conversion is relevant would recognize it as a matter of fact. E.g. if Good Jewish Boy ™ decides to be baptized as a Roman Catholic at age 18, he can just do it, without notifying local or national authorities (though it may make his mother cry).

What is it like in jurisdictions that officially register, regulate, or track a person’s religion? I’m guessing that different countries are going to approach this with different philosophies. Some may make adjusting an officially recognized affiliation as easy as filling out a form and mailing it to the census or tax office, and others (such as Islamic countries) may make it a living nightmare.