Sorry forgot about this,

.
In my case, this problem happens when I change the file name (title) and send the new file to kobo and before disconnecting also delete the original file. When this happens the kobo will consider it as two separate files and collections will show an additional file. But the difference is only in the collections and no other impact. This happens only if deletion and addition happens together; if you disconnect and add, the collections show correct values.
I ended up comparing every collection in kobo with calibre and deleting (in kobo) whatever showed difference. Logging out of kobo might have been easier, I believe. Also, restarting doesn't seem to fix it.
The database itself is okay. I did check with the kobo utilities, just to be sure.
A big thank you for the help.