move count to api
merge