Pharah is a very hard character to counter due to how much distance she covers and how long she can stay in the air for. Characters like McCree, Widowmaker and Soldier: 76 are all effective counters to her as their weapons are all hitscan and deal massive amounts of damage.
D.Va can use her Boosters to either reach a higher platform or get into Pharah's face and continue damaging her if she attempts to outrange her. Additionally, Pharah's entire Barrage can be absorbed by D.Va's Defense Matrix. If she is in the air when D.Va uses her Self-Destruct she will likely die since the blast deals damage to enemies in all directions within 20 metres.
Since Pharah travels slowly across the air, McCree will be able to land shots on her with his Peacekeeper. He can use his Combat Roll to lessen the chances of him taking any critical damage. His Deadeye will lock onto Pharah while she is in the air, giving her very little chance of surviving if she caught in the open. If Pharah decides to get up close and personal, McCree has his Flashbang, which he can also use to interrupt Barrage if Pharah is too close to the ground.
Soldier: 76's hitscan bullets of his Heavy Pulse Rifle means he can very effectively duel Pharah. If Pharah runs out of fuel for her jetpack, he can fire Helix Rockets as soon as she touches the ground. Soldier: 76 can use his Sprint to evade the rockets, minimizing the damage done to him, and return fire when she decides to reload. He can also very quickly punish a Pharah using Barrage at the wrong time. His Tactical Visor will lock onto Pharah while she is in the air which can be used to quickly and effectively eliminate her from any range.
Widowmaker's scoped Widow's Kiss deals massive damage to Pharah from a distance. If Pharah attempts to escape her line of sight, she can use her Grappling Hook to reach a higher ledge to once again have sights on her and she can very easily punish her with a single scoped headshot if she uses her Barrage at a bad time. She can also use her Grappling Hook to escape taking any critical damage from her rockets.
Pharah's tendency to stay airborne makes it hard for Junkrat to hit her with his grenades. In addition, Pharah is excellent at spotting and destroying Junkrat's traps and RIP-Tire from the sky in 1 rocket which can potentially save her team from harm.
Lucio's Sonic Amplifier primary fire will have trouble landing shots on Pharah while she is in the air and his Soundwave will be completely ineffective against her seeing as how it is very unlikely she will fall to her death. His Crossfade: Speed won't be enough to save him from Pharah's rockets if she is pursuing him and her Concussive Blast can be used to knock him off the wall if he attempts to escape by wall riding or knocking him to his death if he is near a ledge. Due to the massive knockback size, it is unlikely he will be able to reach a wall in time to save his own life.
Since Doomfists' abilities revolve around close-quarters combat, he will be ineffective against Pharah while she is in the air. His only option is to try and land shots on her with his Hand Cannon but due to the spread and Pharah's mobility while in the air, it will be difficult for Doomfist to stand a chance against her.
Pharah usually stays out of Mei's range by flying, and can use either of her abilities to increase distance between the two if she ends up in Mei's range. While Pharah's damage is blocked rather easily by Mei's Ice Wall, Mei can do little against her, and finds difficulty in landing her icicles on a flying target, while Pharah can simply shoot rockets from above.
Reaper's Hellfire Shotguns will not be able to harm Pharah while she is in the air as it is limited to close range encounters. He can attempt to get close using his Shadow Step but Pharah can very easily spot him and bombard him with rockets or knock him off the edge with Concussive Blast. She can escape his Death Blossom using her Jump Jet and eliminate him with ease.
Orisa is vulnerable to Pharah since her Primary Fire are projectiles that travel slowly across the air. She may attempt to get a few easy shots on her by using her Halt! but it will not deal enough damage to Pharah to warrant fleeing and it can be easily countered by using her Jump Jet. The most Orisa can do to Pharah is try to survive long enough by using her Fortify and Protective Barrier abilities but in most cases, Pharah is the victor.
Pharah's Hover Jets makes it hard for Roadhog to do damage to her effectively, and her movements make it hard for him to hit her with his Chain Hook. With the range advantage as well as lack of falloff on her Rocket Launcher, Pharah can deal large amounts of damage to Roadhog from a distance.
Since Reinhardt's movement speed is reduced drastically while his Barrier Field is active, Pharah can get above him and shoot rockets at him and he will not be able to retaliate in turn since his Rocket Hammer will not be able to damage Pharah while she is in the air. He can attempt to damage her using his Fire Strike but will likely see no results since it's hard to aim it at Pharah and it travels slowly in one direction, she can simply move out of the way. Her Barrage can destroy his barrier and will still deal enough damage to potentially kill him and his team.
Symmetra's Photon Projector will not affect Pharah from a range and she can very easily eliminate her and her Sentry Turrets from the skies. In addition, Pharah can scout ahead and eliminate her Teleporter or Shield Generator from a safe distance without having to worry about being bombarded by Sentry Turrets.
Pharah will deal devastating damage to Tracer while simultaneously staying out of her effective range, one direct hit with her rocket will leave Tracer with a measly 30 HP. At this point, Tracer will either be forced to use her Recall or flee the fight entirely and search for a healthpack. Overall, Pharah's ability to deal large amounts of damage and effectively stay out of Tracer's Pulse Pistols' range make her a good counter.
Pharah can eliminate Torbjorn's level 2 Turret from the skies with 3 direct hits from her rockets. If Torbjorn decides to rebuild his Turret with his Forge Hammer while Pharah is shooting at it, he will take damage from her rockets as well. Torbjorn himself cannot do much against Pharah as his Rivet Gun fires projectiles rather than hitscan bullets.
Although Ana may seem like an obvious easy target for Pharah given her limited mobility and not many means of defending herself, her scoped primary fire is hitscan and can still deal devastating damage to Pharah if she is not careful. She can use her Biotic Grenade to keep herself alive just long enough to deal enough damage to Pharah and potentially kill her.
Although she is capable of dealing massive damage to Bastion while in the air, his Configuration: Sentry will absolutely demolish Pharah if she is not careful. Additionally, his Configuration: Recon primary fire is hitscan and can deal damage to Pharah while she is in the air. If he begins to take critical damage, he can use his Self-Repair to heal himself.
Pharah can rely on her rocket's splash damage to kill Genji from afar. She also can easily evade an enemy Genji's attacks. Keep in mind that Genji can use Swift Strike to quickly close the distance between the two, and in such case, will be in an uncomfortable distance from Pharah, who will be unable to avoid his attacks.
An aerial fight between two Pharahs is usually quite intense. Whoever lands a direct hit first, is higher, and has more fuel is usually the victor. Before engaging a fight with another Pharah, make sure you have consistent healing on you, such as from Ana, Mercy, or Zenyatta.
Although Pharah generally outranges Sombra, she is still a high value hack and will suffer greatly if Sombra manages to get a hack off on her as she will not be able to stay in the air or escape using her Concussive Blast. Sombra can stay invisible in order to prevent being detected by Pharah and use her Translocator to reach a high ledge in order to Hack Pharah and ruin her day. In addition, hacking Pharah while she is using Barrage will cancel it entirely.
Winston can use his Barrier Projector to shield him from Pharah's rockets and can use his Jump Pack to reach a high ledge and deal damage Pharah. However, it is not usually a reliable tactic to use and Winston is usually at a disadvantage when it comes to facing Pharah. However, he still cannot be underestimated by her.
Pharah stays outside Zarya's effective range and is very tricky to hit with her Particle Cannon's secondary fire. However, Zarya can use Pharah's rockets to gain easy energy, and her Particle Barrier resists Concussive Blast, meaning a confrontation between the two can go either way depending on whether Zarya has her barrier available or not.
Although Zenyatta may have difficulty hitting Pharah with his projectiles, his Orb of Discord is a big threat to her, as she will need to back off because of how much easier she is to deal with when it's on her.
Pharah's range and mobility make her one of the most effective flankers in the game. However, keep in mind that she is typically considered a big threat to the enemy team and will likely be targeted first by enemy snipers. If you are playing as support, make sure you are always keeping her healed as best you can.
Ana's scoped Primary Fire is excellent at healing Pharah from a long range and she can easily hit D.Va with her Sleep Dart if she is becoming too troublesome as well as other targets to ensure a quick and easy kill for Pharah. Her Nano Boost will boost Pharah's damage as well as make her more durable which means she can kill enemies more effectively with Barrage or move behind the enemy lines while Ana continues to heal her in the air to eliminate high value targets such as other support heroes.
Mei's high crowd control allows Pharah to land direct hits much easier. Ice Wall can block popular choke points, letting Pharah spam fire rockets into the general area. A well timed Blizzard can easily put the entire enemy team at Rocket Barrage's mercy.
Mercy's Damage-boosting Beam and Guardian Angel abilities combined with Pharah's Hover Jets and Rocket Launcher make for one of the most deadliest combo's in the game; known notoriously to the Overwatch community as "Pharmercy". Mercy can boost Pharah's damage output and can rely on her to keep her out of harm by staying in the air. In turn, Mercy can use her Healing Beam to heal any damage done to Pharah.
Zarya can provide Pharah with Projected Barrier which will protect her from any high value threats such as Widowmaker or Soldier: 76. She can also protect her from D.Va if she becomes too problematic. Her Graviton Surge will group every enemy together for Pharah to get multiple kills with her Barrage or she can simply shoot rockets at them and eliminate them all at once.
Zenyatta can use his Orb of Discord on enemies that Pharah is targeting to increase the amount of damage they take. He can also use his Orb of Harmony on her which will heal keep her healed while in the air.