Sharing: adds a possibility to use multiple share counters per post

This is a replay of #1286 that deals with the same problem - being unable to use several sharing block for one post ( #1234 ), and additionally makes the code for `get_counts` more DRY, fixing one global scope leak in the process.