So I was working on my website and all my categories disappeared. They're still in the front end but nothing in the backend.
Also in the posts page, it says I have 52 pages but it's showing only 14. I had a tool to show all posts on the front end and it's showing a lot of spamming posts yet I can't find them in the backend.
Welcome to our forums. Without having access to your account and the hosted domain, it would be difficult to determine the issue via our forums. I suggest reaching out to our support team to look into this.
I had this same problem. I purchased Site Lock from Go Daddy so I thought I would be protected from malware. After I found this topic on the Wordpress support site I used a plugin called Anti-Malware by Eli. I ran the scan several times and on the 4th run it found the exact malicious code others had reported. After the malware was removed, all of my categories returned and I could see and delete the 40+ malicious posts and the categories they had created.