The only way how to calculate aggregate demand in an economy over a given time-period (usually a calendar year) is to add up all of the expenditures that have occurred over that time-period. The 'expenditure model' is one of three measures of national income that economists use to keep track of economic output.
The three models of national income accounting are:
All three methods are used, and together they form an accounting identity:
Expenditure = Income = Output
The reason for this is that all of these methods are essentially measuring the same things but from different perspectives.
Aggregate demand calculation is, of course, subject to some error. However, these errors are relatively small, and when compared against the other measures of national income it is possible for economists to form a reasonable estimate of an economy's size, and how it has grown/shrunk over previous periods.
For a more detailed understanding of general concepts, have a look at my main article via the link:
You should note that the relevant expenditures are those on domestically produced goods and services, meaning that spending on imported goods, whilst constituting part of domestic aggregate demand, does not count towards domestic national income as it is actually part of another country's output. Similarly, foreigner's spending on our goods does count.
There are slightly different measures of national income definition e.g. GDP, GNP, NNP and so on that include different layers of accounting, but the basic approach is the same.
Economists do not actually calculate aggregate demand directly, except in so far as it equates to measuring national income. Instead they are interested in building theoretical models about how it interacts with aggregate supply in order that we can make better sense of related concepts like inflation and unemployment. Those related concepts are definitely measured, and form the basis of economic policy actions, which is why we need to construct theories of how these things interact.
By observing prices, output levels, and unemployment levels, we can infer (rather than calculate) where the aggregate demand and supply curves are, and how they are moving. From that, economists can form policy advice about how best to manage the economy.