This happened to me as well, and it was definitely frightening. Luckily it proved pretty simple to recover from. I'm far from certain on this, but perhaps it'll be the same for you? Here's what I did:
When I logged directly into my terminal, I was informed by a line above the command prompt that:
E: Error: BrokenCount > Orun-parts: /etc/update-motd.d/90-updates-available exited with return code 255
Per Ashish's answer at this link, I ran:
sudo dpkg --configure -a
Running this continued the installation process. I then had to continue to follow the output, manually choose to install replacements of certain files, and rerun the whole command once to get around a 'loop' that came up in the 'triggers'. (Let the single quotes here signify that I have very little idea what my OS is doing in this process, so I took this all at face value and just kept trudging through. NOTE: I AM NOT SAYING THIS TO RECOMMEND IT, just to explain what happened. I was just more concerned with getting back into my normal environment and ensuring that my work was backed up than with researching extensively each of the options that popped up.)
dpkg --configure command exited without Error status. Then I was able to switch the machine off and on again and boot up in the GUI.
At that point a number of red flags went off and Ubuntu threw up a bunch of error and failure messages. I used point-and-click to navigate through these as I could, restarted once again for good measure, then opened a terminal and ran:
sudo apt-get install -f
sudo apt-get upgrade
After this, things seemed to settle down and seemed to be mostly back to normal.
apt-get update currently seems incapable of running, and a number of other minor and strange behaviors are popping up (e.g. getting error messages from Floobits when I run Vim, which I've yet to research). I have a feeling that this kind of stuff will continue for a while as I smooth things out.
Importantly though, I am back in my normal OS environment and files all appear intact! :)
I am far from an expert in this sort of stuff, but I hope this helps.