Changed position of counter update in background.js
Changed server bug where the counter integer was set to "count" in the
dictionary rather than "counter"