By default, Gmail groups all your messages in conversations. That's the reason why Gmail displays the number of conversations and not messages in all the Gmail views: inbox, all mail, labels, search results.
If you ever want to find the number of actual messages that match a certain query, the number of messages from inbox or the number of messages you've sent or received since you started using Gmail, there's a way to do that. Just go to Gmail's settings and temporarily disable conversation view. Find the "conversation view" section in the General tab, click "Conversation view off", scroll down to the bottom of the page and make sure you click "Save changes".
Now Gmail will only display separate messages and the number of search results will be more accurate. You'll be able to find the number of messages, not conversations or threads. A conversation can include one message or more messages, so the number of messages will be bigger. Please note that the number of search results is not displayed if there are many search results, so you need to use a workaround.
The screenshot above shows the "all mail" message counter when conversation mode is disabled, while the screenshot below shows the number of conversations when the conversation mode is enabled.
You can go back to Gmail's settings page to enable conversation view.