couting variables just once