(LOGPRIMARY + LOGSECOND) X LOGFILSIZ X 4096 should be slightly less than the total amount of logspace available on the mount point defined for logging.
Becasue it takes a certain amount of time for DB2 to archive logs and to be able to reuse and/or rename them, I would suggest that you use at least least 5 for LOGPRIMARY and the rest for LOGSECOND. The descision about how many for LOGPRIMARY depends on the LOGFILSIZ. If LOGFILSIZ is 20000 pages, then LOGPRIMARY of 5 is usually enough, but it depends somewhat on the rate of changes of your database. If you leave LOGFILSIZ at the default, then you will want a lot more than 5 for LOGPRIMARY . If you are processing 10,000 changes per second to your database, you may want more than 5 for LOGPRIMARY even if your LOGFILSIZ is 20000.