correction total count (JS)