OJS 3.1.1 counters do not change as expected

I did not want to put this directly on GitHub because I do not know if it is an error or problems on my server.

The counters of discussions and galleys (as seen in the image) do not change as expected.

For example, in this case (image):

  • there is no galley in production and says there are 4,
  • also says that there are 0 open discussions and there is one in the submission stage, three in the review and one in copyediting.
    counts

one more thing… the manuscript is in Production Stage!

Do not take in count my post totally… I understand now how this work, the counts depends on the stage of the manuscript, so in this case, I have not an open discussion in Production so that 0 is OK, but in Production galley created I not have any Galley created… I just have two files at this stage but none as galley