The purpose of the totem is not to tell them whether or not they are in the real world. (That it tells them that is actually a residual benefit, not the purpose.) The purpose of the totem is to tell them whether they are in
someone else's dream or not. They are extractors, and dream hacking is a common crime in their time. The totems are used to protect the team from having someone else invade their mind and extract from (or otherwise manipulate) them. If someone dragged them into a dream that they designed, the team can use their totem, knowing how it's
supposed to behave in a dream. If it does not behave the way that they know it's supposed to, then they are in a dream that someone else designed, because that person doesn't know how to create the pre-established behavior of the totem.
So, to answer your initial question; the totems don't work (in the way that they are intended in the movie), unless you believe that shared dreaming is possible. Even then, their concept is completely fictitious, and they would not even make reliable reality checks, as all reality checks are fallible.
[Edit:]
Also, I believe the only significance of the top spinning at the end was so that Nolan can build the suspense and show the top only begin to wobble, before cutting to black and letting the audience draw their own conclusion about Cobb's Fate. (Planting an idea, as it were.)
I also believe he wasn't dreaming, at the end.

Bookmarks