Wayfair interview question

Write program to count the Subdomain Visits