Agent licenses differ depending on technology. For example, for Web Servers, 1 Web Server = 1 Web Server Agent license, so you will need 8 of these.
For application servers, how many processes will you be monitoring? and what technology do they use?
The most common ones are Java and .NET and these licenses differ. For Java, each JVM you want to monitor will need 1 Java Agent license, however, for .NET processes, only each Host (instance of Windows O/S) will require 1 .NET Agent License, irrelevant of how many .NET processes are on that same host.
If you have 2 JVMs per Application Server, and 4 Application Servers per Application, then you need 16 Java Agent Licenses in total, correct. If there is only 1 JVM per app server, and 4 app servers per app, then you only need 8 Java Agent Licenses.
Separately, you will need the 8 Web Server Licenses to cover your web servers.