Suppose there is a person who openly denies the divinity of the Torah, breaks the Sabbath and declares himself an atheist, but goes to synagogue for the sense of community or for cultural reasons. Can he be counted in the minyan, lead the prayers, or read from the Torah? I am asking of course from a traditional or Orthodox perspective.
I haven't seen it inside, but:
"One may not count one who denies the truth of Torah Sh'baal Peh - aka The Oral Torah (and certainly one who denies The Written Torah received at Sinai via Moshe Rabbeinu) towards a minyan. [One may not count Conservative or Reform Jews towards a minyan.] Shulchan Aruch w/Mishnah Berurah 55:11, Piskei Tshuvos 55:21"
No. In general, if the person is willing to violate the sabbath in public and even in front of a great rabbi, we assume he cannot count for a minyan. Rabbi Nachum Rabinovitch, (All Jews Are Responsible for One Another, from "Tradition and the Nontraditional Jew") based on the Rambam, says that chilul shabbos may not disqualify them if they are a tinok shenishba, but they have to accept the halachik requirements of a minyan to be counted for one. The Rambam said that the kaarites could not be counted for a Zimun because they rejected such halachos, so they cannot just be counted in for social reasons.
The Rambam writes in his introduction to Perek Chelek that anyone who does not believe in his list of 13 fundamentals is not included in "Klal Yisrael." R' Yaakov Weinberg understood this to be true even if the person does not believe through no fault of his own, such as never having learned it. R' Weinberg explained that this is the case because these principles are necessary to having the correct relationship to Hashem, and if one is lacking in any of them, even by accident, they still will not have an accurate relationship with Hashem, and therefore cannot be called Yisrael.
Source: Recorded shiurim of R' Weinberg
That being the case, it would seem anyone who rejects one of these principles (one of which is the divinity of the Torah) does not have a relationship with Hashem, is not called "Yisrael," and could not be counted for a minyan.
one doesn't have to also be an apikores someone who simply does not keep shabbos is not to be counted as part of the minyan. this is the straightforward halacha
here are some things to consider though. there are no apikorsim today. in order to be an apekoris one has to have a great deal of Torah knowledge and understand everything that one is rejecting to begin with. This does not fit the description of many people and possible no one in our time.
The baalei teshuvah movement has grown and continues to grown over time. consider that many people who have reconnected with yiddishkeit would have never done so if they were thrown out of synagogue or even slighted by not being counted in the minyan. After all a yid is a yid and this person coming to the shul is there to learn about something completely new to them that they didn't even know existed or didn't really understand before.
makes me think of the case of which a husband and wife divorce and remarry and therefore and not allowed to remarry each other. however, a genuine teshuvah can bring them back together.
I'm sure you can find better written answers in halachic guidelines written specifically for this subject as it is most relevant in kiruv type shuls. as of right now I am unaware of a specific source for such a thing but perhaps if you go to the aish hatorah website or chabad.org they can help you find something