In normal circumstances - that is, absent an ability, spell, or other condition that states otherwise - a character in Pathfinder provokes attacks of opportunity for casting a spell while threatened. Characters also, again in the absence of mitigating circumstances, provoke attacks of opportunity for making a ranged attack (the most common example is firing a bow) while threatened.
So, for the sake of argument, let us say we have a wizard who casts acid arrow while threatened by a fighter. The fighter, thanks to Combat Reflexes, has 3 attacks of opportunity per round. The wizard has cast a spell (1 provoke), then made a ranged attack while threatened (as part of the spell). Does the wizard provoke just one attack, or two?
Please note that I am not looking for methods to prevent this; rather, I wish to know how many attacks of opportunity the fighter is theoretically entitled to, and why. Answers adhering to the Pathfinder rules as written are firmly requested; again, I am not looking for a ruling, but rather clarification from the text.