It depends on the number of ranks. Typically, there are 61 pipes per rank for keyboard ranks and 32 pipes per rank for pedal ranks.
As the vast majority of pipe organs are custom designed there is no one, definitive answer. A small, hand pumped, table top organ ("or Portative") might have as few as 25 pipes - or two octaves. The...
Scotland
over 9000
As many as you like, depending on how long the pipe can be.