update json with count key