Why did early 747s have only two or three windows on the upper deck on each side?
Early on in the design and development of the aircraft the function of the upper deck changed throughout the early life. Windows are high stress areas and if they can be avoided they typically are. Juan Trippe was a major figure in pushing the 747 into production but during the SST race it was his view that the 747 would largely be a freighter holding the crew on the upper deck. Generally freight aircraft do carry small crews and were likely the original reason for the windows. 


  Boeing was competing for a supersonic transport contract in 1965, at
  about the same time the 747 was conceived, and Pan Am founder and
  chairman Juan Trippe believed that the big subsonic jets would end up
  as freighters and that the SST would replace the 747 on passenger
  routes. Trippe was one of Boeing’s best customers and usually the
  first to order new models, so Boeing put the flight deck of the 747
  above the passenger cabin to give the aircraft a hinged nose for a
  front-loading cargo door.


The original bubble deck was much smaller but created too much drag and was ultimately elongated. This left dead space that Trippe and his team drove Boeing to turn into a lounge/bar akin to the 377 Stratocruiser's area. Bar's rarely have windows on the ground so why have them in the air... 


  The first design for the cockpit enclosure was a hemispherical hump
  atop the fuselage. This produced too much drag, so Boeing extended the
  aft portion of the hump to form a teardrop. Then, in a deliberate echo
  of the below-deck lounge on the model 377 Stratocruiser, Boeing’s
  1940s flagship, Trippe and his colleagues persuaded Boeing to turn the
  extra space behind the cockpit into a bar and lounge.


It was not until almost a decade after its introduction during the '73 fuel crisis that airliners started using the upper deck for full passenger seating. This likely lead to the later models having full window treatment of the upper level. 


  The party days ended with the 1973 fuel crisis, when virtually every
  747 operator got rid of the lounge and replaced it with more seats for
  paying passengers. In announcing the change, a British Airways press
  release noted that the upstairs area was “currently used for a
  first-class lunge”—the spelling was probably appropriate more often
  than not