A connection can be any flight within 24 hours for an international itinerary, or any flight within 4 hours on a domestic itinerary. In either case, if there is no valid flight within the allotted time period, then one may take the next valid flight as a connection even if it exceeds the time limit. (This most frequently applies when connecting to flights that run less frequently than once per day.)
There is rarely any advantage to choosing to make something a stopover rather than a connection when it is possible to make it a connection--it often costs (sometimes significantly) more because of stopover fees, additional taxes, and fare differences, and as the above poster mentioned, you may short-check your bags to any point on the itinerary regardless of whether it is a stop or transfer--you just specify that at check-in (and double-check the bag tags). Plus, there is no guarantee that the checkin computer will recognize the stopover anyway--you'll have to double-check the bag tag regardless.