This is another subject. God hears such prayer. Whether He approves, or more pertinently, whether He answers is another question.
I would say, that if a prayer was done for intercession under the sincere presumption that X is in heaven, and the presumption is wrong, then the same thing happens as if the prayer was sent directly to God, and what exactly the answer will be would depend on the nature of the petition.
But if X is indeed in heaven, then he will join you in the prayer, and God likes that.
Would this mean that if you sent out a mass e-mailing asking for prayer that it would "count" as if every reader of your request had actually prayed for you? Or, if the number of readers was 1,000,000, then it would "count" as if you had prayed directly 1,000,000 times? That would be pretty difficult for me to accept.
I know that you have assurance of the Saints because of the Church, but I still don't follow why anyone would take the chance. Doesn't this appear to be contradictory to all the verses telling us we can't know the heart of another, and in fact, we shouldn't make the attempt? For example:
1 Cor. 4:5 : Therefore judge nothing before the appointed time; wait till the Lord comes. He will bring to light what is hidden in darkness and will expose the motives of men's hearts. At that time each will receive his praise from God.