Is link to my page counted as a backlink when it is not indexed?

In simple words you just need to understand that once when Google crawls your link it knows about it, they ARE counted.

In some cases they are not indexed from various reasons - quality of a page and content are usually problem (you might want to check up on that).

However Google needs to know about page first and find backlinks to be counted.

Therefore web properties need to be crawled.