The icon used for the app is in the .desktop file but is it possible to change this dynamically? You can change the count but not the icon. Is there an API for doing this like OS X?
There is no API available for changing icon dynamically . BTW you customize launcher icon using progress bar and count