My understanding is all objects of the same type will share the same prototype. So change to the prototype will reflect on every objects. But it seems not the case for property of value type. How is this kind of property stored?

```
function Person() {        
}

Person.prototype.name = "John";
var p1 = new Person();
p1.name = "Luke";
var p2 = new Person();
p2.name = "Mary";

console.log(p1.name);  // Luke instead of Mary
console.log(p2.name);  // Mary 

```

In case I want to implement a object count of the same type. What's the best way to do it? In other OO language, you normally just use a static member to do it.

![enter image description here](https://i.stack.imgur.com/ta2FU.png)