(It's 50, and no, territories like Washington DC and Puerto Rico can't cast votes for president or congress.)
There are federal laws that determine when certain things must happen (elector votes to DC etc.) and then a mishmash of state laws on the actual voting process and counting. Ballots will feature the presidential vote, of course, and for some, senator, and for others all kind of state local issues. Americans vote for everything.
I lied about the 8th (that's when the votes must have been counted*), the requirement is that the electors meet and cast their vote 'on the first Monday after the second Wednesday in December' - then the votes have to arrive by pony post in DC by the 23rd. The gap between the 8th and 14th is a 'safe harbor' to settle disputes before the electors cast their vote.
*it was on this that the Supreme Court stopped the Florida recount for Gore vs. Bush, the state-wide recount would not have been complete before the 8th.