Since instanceCounter is a static variable, all objects share the same variable. Since you are incrementing the instanceCounter during each object construction, at the end of creating 5 objects, its value is 5.
Consequently you get the output as 5 in all your sys outs. Thats the point of static
EDIT
To achieve what you need, do the following:
class MyObject {
static int instanceCounter = 0;
int counter = 0;
MyObject()
{
instanceCounter++;
counter = instanceCounter;
}
}