Try something like this
public class Record {
private static final int MAX_INSTANCES = 1;
private static volatile int instanceCounter = 0;
private Record() {
if (instanceCounter >= MAX_INSTANCES)
throw new RuntimeException("max instances exceeded");
instanceCounter ++;
}
}
In the above example you can instantiate max 1 time, change the value of MAX_INSTANCES accordingly as per need.
I hope I understood your question correctly.