• I guessed 7 and got it wrong.

    I've just created a test database to try this.

    Including actual execution plan shows nothing...

    displaying estimated execution plan shows 8 queries, however, these 2 are counted as 1:

    SET QUOTED_IDENTIFIER ON; SET ARITHABORT ON;

    And both BEGIN TRAN and COMMIT are counted as queries in their own right. I suppose that's fair.

    Interestingly, if you move QUOTED_IDENTIFIER to be the last one, estimated query plan counts it and COMMIT together as one query. I tried that hoping to see it say 9 queries but not what I expected at all. Seems like yet another quirk of the estimated query plan to me rather than being anything useful regarding the nature of the commands.

    I hope someone can elaborate on this.