code counter based on npm