Counting distinct entries in a column using relational algebra
Besides the more compact syntax (from @McNets' answer):

select   User,
         count(distinct Hotel_Reviewed) HotelsReviewed
from     InitialRelation
group by User;


we can also do a projection first to find distinct User, Hotel_Reviewed pairs and then aggregate:

select   User,
         count(Hotel_Reviewed) as Hotels_Reviewed
from     
    ( select distinct
               User,
               Hotel_Reviewed
      from     InitialRelation
    ) as D
group by User ;


This leads us to the relational algebra notation:

R = Ɣ User, COUNT(Hotel_Reviewed) -&gt; Hotels_Reviewed 
        (π User, Hotel_Reviewed (InitialRelation)) -&gt; D