Here’s the easiest and quickest way to get your unruly inbox back to zero.
If you use inbox tabs (currently the default for Gmail) click the Settings Cog, then Configure Inbox, and uncheck all tabs aside from Primary. You can add them back later if you like.
If you have some other inbox configuration, go to Settings > Inbox and set your Inbox type to Default.
Now, from your inbox, click the checkbox dropdown, and select All.
Atop your inbox it will say “All xxx conversations on this page are selected. Select all x,xxx conversations in the Inbox. Click that bad boy.
Now everything is selected. Just click the More box, and select Mark as Read.