Tech Mahindra Interview Question

Write a class which for which only three objects can be created.