Is there a specific order for which ballots are counted first, or are mailed-in ballots and in-person ballots counted in different locations and therefore are done at the same time?
That depends on the laws in each state. In some states mail in ballots can be counted as they come in but in others they can't be counted until the polls close.
I have included a couple of states for reference but the article lists what is expected in all 50 states and the District of Columbia
Should be relatively quick. Counties were allowed to start processing absentee ballots on Oct. 19, and only ballots mailed from overseas may arrive after Nov. 3. “For races that aren’t too close, we’ll have those results” on election night, the secretary of state told WSB-TV. “For the races that are very, very close, we believe that we’ll have them by Wednesday or Thursday at the latest.”
It’ll be slow going. Although around half of Pennsylvanians are expected to vote absentee, those ballots can’t start being processed until 7 a.m. on Nov. 3. Simply put, that’s not enough time for many counties to count them all before the day is over. (For example, Bucks County plans to count ballots 24 hours a day and still doesn’t expect to be done until the end of the week.) Some places aren’t even going to try; Cumberland and Erie counties, for instance, say they won’t count absentee ballots until they’re done with Election Day votes, which could be as late as Wednesday morning. And even counties that manage to count all the ballots in their possession on election night will have to wait until Nov. 6 — the deadline for most mail ballots to arrive — to consider their results complete. Overall, election officials estimate that “the overwhelming majority” of votes will be counted by Friday. That said, don’t rule out an even longer wait. During the June primary, about half of counties were still counting a week after the election. No matter what, we’ll definitely know the outcome by Nov. 23 — the deadline for counties to stop counting.
In some locales, you are allowed to vote in person even if you mailed a ballot in. (And even where this isn't officially permitted, a voter may show up in person to vote and dispute that they voted by mail even though a mailed ballot in their name was received.1)
In such cases, the mailed ballot needs to be found and removed from the count. That's only possible if the mailed ballot is still sealed within its identifying wrapper, because once they are separated there's no way to know which ballot went with that voter.
This implies that counting of absentee ballots can't begin until in-person voting has closed.
1 This situation is explicitly listed in the video trailer about voter disenfranchisement that Twitch has been pervasively running during ad breaks for the last couple weeks, and also happened to someone I know personally. So spare me the "there is no fraud" claims.