Use missing_columns function to add missing trends and return number of added trends.