Why does the number of apps "optimized" not reflect removed apps?
When Android optimizes apps it will optimize all apps, including system apps that you cannot see/remove (well, technically you can, but that's a different question).

If you just check the installed apps on your phone it will just show you the apps that YOU have manually installed and that is why the number is not the same.