Number of virtual tables that specified user is able to write queries in PostgreSQL
I try to answer your question - to be correct, I try to answer the question I think you've asked (see the comments).  Until then I'll assume that a virtual table is simply a table and you want to count the tables a user has SELECT privilege on.

First, you have to collect all roles which the given user belongs to.  This will include the user itself, all roles that are granted to it, all roles that are granted to the roles granted to your user etc., and finally, but usually most importantly, the PUBLIC role.  

You can collect these from the information_schema.applicable_roles view with a query like this:

WITH RECURSIVE privs(grantee, role_name) AS (
    SELECT grantee, role_name 
    FROM information_schema.applicable_roles 
    WHERE grantee = 'my_user'

    UNION ALL

    SELECT ar.grantee, ar.role_name
    FROM 
        information_schema.applicable_roles ar 
        JOIN privs ON ar.grantee = privs.role_name
)
SELECT role_name FROM privs

UNION 

SELECT 'my_user'

UNION 

SELECT 'PUBLIC'


Then you have to consult the information_schema.table_privileges view.  In order to see all the rows belonging to all grantees, you have to be logged in as a superuser.  With an ordinary user you will see only the roles granted to your user (including indirectly granted roles, ie. if the grants are user -&gt; user1 -&gt; user2, you will see user -&gt; user1 and user1 -&gt; user2 if logged in as user, and only user1 -&gt; user2 if logged in as user1.)

Here you can look for tables with SELECT privilege like

SELECT table_name
FROM information_schema.table_privileges
WHERE 
    privilege_type = 'SELECT'
    AND grantee IN (... the recursive query above goes here ...)
;


Turning this into a count is left as an exercise for the reader :)