optimize inbox size requests

uses the least number of queries possible to calculate inbox size