How many pokécoins can you get from pokémon gyms? [duplicate]

Solution 1:

You get 10 Pokécoins and 500 Stardust for each Gym you are currently, at the point of retrieval, holding. This only works up to 10 Gyms for a total of 100 Pokécoins and 5000 Stardust.
You can retrieve every 21 hours as long as you have a Pokémon in at least 1 Gym.

Therefore it is an efficient tactic to gather as many Gyms as possible in a small timeframe, and at the point you hold the most - retrieve your rewards.

Solution 2:

The most you can get is 100 pokecoins and 5000 stardust by holding 10 gyms every 21 hours. If you hold anymore it will not get you any more bonuses.