To reproduce this bug:
1. Place on the page wiki portlet and Tag Navigation Portlet
2. configure Tag Navigation Porlet to display tags for "wiki" and do not display "empty tags"
3. Create some wiki page and, during creation, assign some tag (for example "wiki") on it
Page created, tag is assigned, but, tag is not displayed in the cloud.
If you will create another page with same tag - it will be started to display in the tag navigation - so, it only reproduced then new tag is created during some asset creation.
Actually, problem happens in AssetTagsLocalServiceImpl.updateTagStats - in this method line:
int assetCount = assetTagFinder.countByG_C_N(tag.getGroupId(), classNameId, tag.getName());
I think it happens because tag was created, but not flushed yet. Looks like we need to "flush" hibernate session after tag creation (tag in this case created in AssetEntryLocalserviceImpl.updateEntry method)