Gyms can hold up to a certain amount of pokemon depending on their gym level. For example, a level 7 gym can hold up to 7 pokemon, however each trainer can only have one of their own pokemon on any given gym. To get more pokemon at a particular gym, you must first level up that gym to increase it's defending capacity, then wait for other people in your faction to place their pokemon at that gym.
You can have 1 pokemon in an unlimited number of gyms, but the maximum defender bonus you can collect from owning gyms is 10. For example, if I had pokemon posted at 15 different gyms, I could at most collect 100 pokecoins and 5000 stardust every 21 hours.