Is there like a console command to end a questline and have it count in the statistics? I have already tried to find if there was a console command for it but I couldn't find any
completequest <QuestID> is your solution.
However, you have to know ids of quests so you can simply complete them with this command in order.
Alternatively, you could use
setstage <quest id> <stage value> to finish all of the quest. However, you will need to figure out the Quest and Stage ID's to do this.
SetStage is recommended since CompleteQuest can cause bugs.