Do doctors diagnose bronchitis by how long the person has been coughing?

No. The diagnosis is based upon the history, the physical exam and any testing done such as xrys.The whole picture is evaluated, not just 1 piece of the puzzle.
Partially... Chronic bronchitis is considered when a patient has a productive cough which lasts for several months a year for several years. Then pulmonary function tests are done to reveal the presence of chronic obstruction. There are treatments available but no cure. Once a cough is present for 3 weeks or more, a person should be evaluated by a physician so treatment can be started.