I have had a similar vexing problem with Apple mail/Yosemite for 3 months. Several times a day my Inbox, Sent and Trash were blank when I knew there was mail in all three. The temporary remedy I used to "see" those emails was to quit Mail or reboot my computer - both worked for a brief time but kept recurring.
I tried many things including appeals on this blog, contacting my ISP, cursing, praying, & begging all to no avail. I even tried re-installing Yosemite again to no avail. I have very successfully been unsuccessful!
Finally I changed a habit I had of "exiting mail" via the left top red dot and started to use Quit Mail every time I was through using it for even a short while. I also did not turn off my computer at the end of the day & just put it in sleep mode. For a few days now that seems to have resolved that issue even the continuance of putting my computer to sleep when I go to sleep. I am the sole user.
I am keeping my fingers crossed that this Quit Mail strategy will give me some peace.
You can try it if applicable & see if it resolves your problem with Apple mail.
Just like the guy who jumped off a 20 story building when asked passing the 10th floor how things are going: "So far, so good!"