In brief
Filling an array does not create an independent copy for each position.
Useful to know
fill() records one value in a selected array range. In Array(3).fill(0), you get three zeroes. In Array(3).fill({count: 0}), the three positions point to the same object . [1]
If you change count in the first position, the change is also visible in the others. For independent records, create a new object for each position, for example, Array.from({length: 3}, () => ({count: 0})). The difference is important for forms and tables, where editing one line does not have to change all.
Sources
For further detail and to check the information: