Object counter « counting box »

Why don't you post the whole error message? The problem is in the part you didn't post... the part where the compiler tells you what happened.