For your information, I found this page in GitHub Help, which explains the difference between author date and commit date:
"In Git, the author date is when someone first creates a commit with git commit. The commit date is identical to the author date unless someone changes the commit date by using git commit --amend, a force push, a rebase, or other Git commands.
On your profile page, the author date is used to calculate when a commit was made. Whereas, in a repository, the commit date is used to calculate when a commit was made in the repository."
So after I pushed a single commit to the gh-pages branch, the author dates of the commits I had overridden were still somewhere and thus counted in my contributions, whereas the commit date were erased with the commits and thus I did not see them in the repo. At least this is what I have understood.
So I deleted the gh-pages branch on both local and remote repos, pushed a new clean gh-pages branch and now everything works as expected.