Oh for heavens sake. I hate to sound intolerant or worse ignorant, but why would people think their prayers didn't count? When I was a child my dad taught me to say my nightly prayers on my knees before I got into bed. As I and more importantly my knees have aged I have taken to saying my prayers in bed. I still believe God hears my prayers.
It seems to me that since some of these houses of worship are centuries old it makes sense that their alignment might be off a bit. Did they even have plumb bobs and compasses 2000 years ago? Another thing, some scientists believe that the earths orbit has become more elliptical in the last 500 years. So perhaps when these mosques were originally built they were inline; but now they appear offline.