api: allow username in getacceptedcount

This allows passing a username instead of user_id to the `getacceptedcount` in the api.

I can't figure out my user id and thus currently cannot get any data from this function. A fast merge would be appreciated since I'm working on a small project at the moment and can't really continue without this :)

Thanks!