Updated the NodeJS method of counting.