Does a conference talk in an invited session count as an invited talk? Here is the situation: Prof. X organizes an "invited session" at a conference (in the broader realm of statistics and economics), and asks my supervisor, Prof. Y, to give a talk there. Y does not have time and refers X to me (I am a PhD student). Therefore, X asks me whether I would be interested to give a presentation in the session, to which I of course say yes.

Now, my question is the following: Can I list the talk as an invited talk (or more precisely: as an invited conference presentation) in my CV?
Yes, you can list this as an invited talk.  Even though the first invitation was not to you, the second invitation most certainly was.

Here is another way of thinking about it that may make it clear: imagine that rather than inviting your professor, the organizer has simply asked your professor: "Who do you think would be good to invite to my session?" and your professor suggests you.  This would clearly be an invitation (albeit one where you benefit from your professional network, which often happens).  The only difference between this situation and yours is that the suggestion was preceded by a failed invitation of your professor.