Update background.js

fixed the api request and badge count