 		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,

			LastUserName = IsNull(c.LastUserName,(SELECT Name FROM [{databaseOwner}].[{objectQualifier}User] x where x.UserID=c.LastUserID)),
			LastMessageID = c.LastMessageID,
			LastTopicID = c.TopicID,
			TopicFlags = c.Flags,
			c.Priority,
			c.PollID,

		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,
