Fix for query locking up db/app server

The previous code retrieved all votes for a given account then just took a count of them. One user in question had over 5000 comment votes, which was causing PostgreSQL to sometimes kill the query with the error, "stack depth limit exceeded HINT:  Increase the configuration parameter "max_stack_depth", after ensuring the platform's stack depth limit is adequate."

[#43729801]