This extension gives you the option to count all the applications installed, and it provide a count on all applications installed (or deleted) by the user. The deleted app method only works if the app has a leave data flag set. Most apps do.
The WithDeleted only provided an app count that the USER HAS INSTALLED through some action at the user level. It does not include System Apps. This is by design.
The newest Block is TotalPackageNamesListWithDeleted. It will give you a list of the packages by name.
Also a big change with this version is it now supports all API levels. The previous version only worked up until API 23. Also corrected some spelling errors and redid descriptions.
This is good extension to use if you are using a bonus method of granting rewards by installing other apps, or you discover a new hacked package available and want to test for it being there. This will be rolled into the larger HackProtect Extension. When it is, it will be released with the HP name at the end.
An integer is returned for each of the options, so you can use that as part of an if or block.