Compact 800, license
It is calculated based on signals. Signal definition is mentioned above from (product guide, 3BSE041037-510 compact HMI 800 V5.1 - page 67).
If you use wizard with Medium complexity application, it will consider 2.5 signals license per IO, which is quite ok for most of the project. However, if you need to have accurate calculations, you need calculate as per above definition. Of course, you need to calculate total signals license based on total tags / IOs in the project.