(covers information from several alternate timelines)
Notable uses of "number one" Edit
Captain Picard typically referred to his first officer, Commander William T. Riker, as "Number One" aboard the USS Enterprise-D and USS Enterprise-E (TNG: "Encounter at Farpoint", et seq., Star Trek: First Contact)
In 2365, when the crew prepared their ruse against the Ferengi, Picard said "Are you ready, Number One?" and both Riker, on the USS Hathaway, and Data, as acting first officer, answered him. (TNG: "Peak Performance")
While he was trapped in the turbolift with the three 2368 Primary School Science Fair winners, Captain Picard referred to Marissa Flores as "Number One." Some confusion came about later when both she and Riker responded to the title on the bridge. (TNG: "Disaster")
While age regressed, Captain Picard posed as Commander Riker's son in order to route access to the ship's systems to the school classroom. When Riker agreed to do this, Picard slipped out of character and said, "Thank you, Number One." However, he realized his mistake and recovered by saying, "He's my number one dad." (TNG: "Rascals")
Background information Edit
The first draft of the Star Trek: The Next Generation "bible" created while the series was in development noted that this nickname was chosen as a homage to historical British Navy tradition. (Star Trek: The Next Generation Companion, 2nd ed., p. 14).
The nickname featured prominently in the first casting call for The Next Generation, sent out on 10 December 1986. This document listed "NUMBER ONE (A.K.A. WILLIAM RYKER)", and all other references to this character were to "Number One" rather than "Ryker". (Star Trek: The Next Generation Companion, 2nd ed., p. 13).
In her novel Vulcan's Glory, TOS writer D.C. Fontana suggested Captain Pike called his first officer this because she was an Ilyrian colonist who was named "Number One," because she was the best intellect among her generation.
In novels set after Star Trek Nemesis, Worf has become Picard's first officer on the Enterprise and Picard immediately started referring to Worf as "Number One," which privately made Worf a bit uncomfortable at first, as he thought of Riker when Picard would say that.