Fix vote counts on policy#index page

Fixes #126 for Rails only so far.

TODO:
- [x] Fix PHP?
- [x] Refactor Rails stuff, e.g. rename nasty PHP variable names