Please use code tags, so your code is actually readable: Using code tags properly
counterView is null. You have to assign a value to it before you can use it. If you are following a tutorial, go back and check that you have copied it correctly. Otherwise, consider adding “public” to the start of the declaration and assigning it in the inspector