 			LastUserName = IsNull(c.LastUserName,(SELECT Name FROM [{databaseOwner}].[{objectQualifier}User] x where x.UserID=c.LastUserID)),
 			LastMessageID = c.LastMessageID,
 			LastTopicID = c.TopicID,
+			FavoriteCount = (SELECT COUNT(ID) as [FavoriteCount] FROM [{databaseOwner}].[{objectQualifier}FavoriteTopic] WHERE TopicId = IsNull(c.TopicMovedID,c.TopicID)),
 			TopicFlags = c.Flags,
 			c.Priority,
 			c.PollID,

		LastMessageFlags = c.LastMessageFlags,
		LastTopicID = c.TopicID,
		TopicFlags = c.Flags,
		c.Priority,
		c.PollID,
		ForumName = d.Name,

		LastMessageFlags = c.LastMessageFlags,
		LastTopicID = c.TopicID,
		TopicFlags = c.Flags,
		FavoriteCount = (SELECT COUNT(ID) as [FavoriteCount] FROM [{databaseOwner}].[{objectQualifier}FavoriteTopic] WHERE TopicId = IsNull(c.TopicMovedID,c.TopicID)),
		c.Priority,
		c.PollID,
		ForumName = d.Name,
