How do I count elixir?
In any competitive game there is something called "game sense", what this means is that as you play the game you start to understand the intricacies of the game and is able to do certain things that an inexperienced player wouldn't do.
As for Clash Royale, you need to understand what deck your opponent is playing and be able to understand how much elixir your opponent has based on the cards he has played. For example after your opponent goes all in with hog/goblins/prediction log, you need to be able to add the elixir of those cards, which happen to be 8, so after you defend this push and has units left over, you can get a huge counter push and your opponent will only have 3 elixir to defend.
Basically, there is no correct way to count elixir, pros can do this because they play a lot and are naturally good at keeping a clear mind. Just keep playing, and understand how to properly punish your opponent for making bad all in plays.
A quick method of counting elixir is using your own as a reference. Example of a game:
I put minions and miner(6 elixir) at 9.9 elixir and he puts a minion horde when I have 5 elixir=> he lost 1 elixir for the delay and I know he is still on par with me
He plays hog rider and Goblins(6) and I play barbarians, he will be -1.
Continue the count from -1 for each card he plays after you play the response, only adding the difference
You can divide a battle into multiple plays (where you and the opponent put down cards) and keep the score after each play.
Keeping score of the opponents elixir and his card rotations are just as important as a good and upgraded deck.
There's an app called Elixir Counter that could help you in counting elixir, you'll have to enable "Elixir counter mode" option in settings and click on each card your opponent plays.